[討論] 請教一下cell的用法

看板MATLAB作者 (已經跟你們沒有關西)時間11年前 (2014/06/03 11:05), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
以下是我片段的程式碼 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://www.ptt.cc/bbs/MATLAB/M.1401764752.A.CE9.html
文章代碼(AID): #1JZJkGpf (MATLAB)
文章代碼(AID): #1JZJkGpf (MATLAB)