作者longted3 (已经跟你们没有关西)
看板MATLAB
标题[讨论] 请教一下cell的用法
时间Tue Jun 3 11:05:49 2014
以下是我片段的程式码
result_right = cell(frquency,1);
count_right=1;
result_left = cell(frquency,1);
count_left=1;
for time=1:2
for i=1:frquency
temp=[];
for j =1 :mrk.y_end
x=array_split_2(cnt,mrk.pos(j));
if(mrk.y(j)==1 && time==1)%右手
temp=[temp,x];
else%左手
temp=[temp,x];
end
end%end-of-j-loop
if(time==1)
result_right{count_right,1}=temp;
count_right=count_right+1;
else
result_left{count_left,1}=temp;
count_left=count_left+1;
end
end%end-of-i-loop
end%end-of-time-loop
想请问一下 为什麽在matlab 展开变数中 我的temp 阵列是确定有值 但是我把它存在
cell 当中 cell 中却没值 有高手可以跟我说为什麽呢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 118.168.184.150
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/MATLAB/M.1401764752.A.CE9.html