05 2023 档案
摘要:目录 什么是numpy numpy的安装 numpy数组 定义numpy数组 numpy数组的相关功能 基本操作 0数组和1数组 随机数组 二维数组 numpy的数组操作 我们再平常学习python和matlab中经常会看到一个词numpy,并且各大项目算法中都会涉及它,那究竟什么是numpy呢,我
阅读全文
摘要:/* 开发者:慢蜗牛 开发时间:2020.6.11 程序功能:顺序输出和逆序输出 */ #include<stdio.h> #include<malloc.h> #define LEN sizeof(struct L) void print(struct L* head); void _print(
阅读全文
摘要:del函数 如果知道要删除元素在列表中的位置,可以使用del语句: list_1 = ['one', 'two', 'three'] print(list_1) del list_1[0] print(list_1) 根据索引,del语句删除了list_1列表中的第一个元素——'one' ['one
阅读全文
摘要:sort() 正序 sort()可以按字母的顺序来对列表进行永久性排序(改变列表自身的排序): list_1 = ['one', 'two', 'three', 'four', 'five'] print(list_1) list_1.sort() print(list_1) 现在list_1列表中
阅读全文
摘要:#include<stdio.h> int main() { double a, b, h, s;//定义变量,上底,下底,高,面积 scanf_s("%lf,%lf,%lf", &a, &b, &h);//输入 s = (a + b) * h / 2.0;//计算面积 printf("%lf",
阅读全文
摘要:利用Sobel、Roberts、Prewitt、Canny、log和拉普拉斯算子进行边缘提取。 clear; clc; % 图像的灰度化处理 JPG=imread('1.jpg'); JPG=rgb2gray(JPG); I=im2double(JPG); % Sobel算子边缘检测 %BW=edg
阅读全文
摘要:#include<stdio.h> void main() { int n, s=0; scanf_s("%d", &n); for (n; n > 0; n--) s += (1 + n) * n / 2; printf("%d", s); }
阅读全文
摘要:append()函数 在列表中添加新元素时,最简单的方法就是附加在末尾: list_1 = ['one', 'two', 'three'] print(list_1) list_1.append('four') print(list_1) 函数append()就是将'four'添加在列表末尾,而且不
阅读全文
摘要:/* 开发者:慢蜗牛 开发时间:2020.6.11 程序功能:逆序建立链表,顺序输出 */ #include<stdio.h> #include<malloc.h> #define LEN sizeof(struct once) struct once//建立结构 { int a; struct o
阅读全文