摘要:
写出下列语句的计算结果及作用 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 阅读全文
摘要:
写出下列语句的计算结果及作用 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 阅读全文