Loading

摘要: 写出下列语句的计算结果及作用 clear 清除所有变量 clc 清屏 A = [2 5 7 1 3 4]; 创建行向量并赋值 odds = 1:2:length(A); 冒号操作符,创建从1到length(A),,步数为2的行向量 disp('odd values of A using predef 阅读全文
posted @ 2020-06-17 16:18 sq800 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 写出下列语句的计算结果及作用 1.A= [2 5 7 3 1 3 4 2]; 创建二维数组并赋值 2.[rows, cols] = size(A); ​把A的尺寸赋值给数组,rows为行,cols为列 3.odds = 1:2:cols; ​创建从1到cols的数组,步数为二 4.disp('odd 阅读全文
posted @ 2020-06-17 16:13 sq800 阅读(672) 评论(0) 推荐(0) 编辑