change name in for loop
古いコメントを表示
for k=kk(1):kk(end)
ricampionocan2(:,i)=cat(2,ricampiono{1,i}(:,2));
ricampionocan3(:,i)=cat(2,ricampiono{1,i}(:,3));
ricampionocan4(:,i)=cat(2,ricampiono{1,i}(:,4));
end
I have this for loop (k) inside another for loop (i). I must break the cell structure and change name at ricampionocan pairing it with k. I would like it to become ricampionocan (k function).
can you help me?
3 件のコメント
"can you help me?"
Yes we can! The best help we can give you is show you how this can be done much more reliably and much faster using indexing and just one variable: i.e. store your data in a cell array or a 3D array:
ricampionocan = zeros(rows,cols,kk(end));
for k = kk(1):kk(end)
ricampionocan(:,i,k)=cat(2,ricampiono{1,i}(:,k));
end
rr88
2016 年 2 月 25 日
rr88
2016 年 2 月 25 日
回答 (1 件)
1 件のコメント
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!