matlab里面怎么给一个数组用for循环赋值。比如说我要给a[5]用循环赋值a[1]=1,a[2]=2,a[3]=3,...

如题所述

n=10;
a = zeros(10,1);
for i=1:n
a(i) = i;
end
温馨提示:答案为网友推荐,仅供参考
相似回答