任何人都可以帮助将多个标量输出转换为矢量输出吗?
Can any anyone help to convert multiple scalar outputs into a vector output?
对于这样的情况:
for i = 1:3
X = 4*i
end
我得到以下输出
X =
4
X =
8
X =
12
谁能帮忙输出这样的向量:X = [4 8 12] ?
X(3) = 0;
for i = 1:3
X(i) = 4*i;
end
对于这样的情况:
for i = 1:3
X = 4*i
end
我得到以下输出
X =
4
X =
8
X =
12
谁能帮忙输出这样的向量:X = [4 8 12] ?
X(3) = 0;
for i = 1:3
X(i) = 4*i;
end