作者ljuyentintho (小刘)
看板MATLAB
标题[讨论]创造X变数序列碰到的小麻烦
时间Wed Mar 16 03:26:48 2016
我想写一组Xi序列
就是一个矩阵里有X1,X2....Xi这些元素
目前的程式如下:
for i=1:10
class1 = strcat(class1, 'X', num2str(i));
end
class1
如果我把输出改成class1'
会变成
class1' =
X
1
X
2
X
3
.
.
.
这不是我想要的输出结果
我想要的输出结果是
X1
X2
X3
.
.
.
有高手能帮我一下吗?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 220.132.55.42
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/MATLAB/M.1458070011.A.907.html
1F:推 sunev: 看起来像是class1没有清掉 03/17 02:59
2F:→ ljuyentintho: s大那要怎麽办? 03/17 04:59
3F:→ jeffppp: 回圈前加 class1=[]; 03/17 09:07
※ 编辑: ljuyentintho (140.114.54.170), 03/17/2016 14:58:09