how to save a name in a cell

2 ビュー (過去 30 日間)
hasan alhussaini
hasan alhussaini 2018 年 3 月 8 日
コメント済み: Stephen23 2018 年 3 月 8 日
Hey,
so basically i have this variable v, that is in a loop k:1:600 the loop looks at all my images in the folder(which is 600) and tells me what animal is in each image for e.g 1st loop v = 'sheep' 2nd loop v = 'lion' 3rd loop v= 'horse 4th loop v = 'sheep' etc i'm trying to create a variable that has 600x1 dimensions, that saves the results
category(k,:)= v; however its not working, any luck guys?
also i keep getting this error "Assignment has more non-singleton rhs dimensions than non-singleton subscripts"

採用された回答

Ahmet Cecen
Ahmet Cecen 2018 年 3 月 8 日
If you intended to use cells, they are indexed with curly brackets:
category{k} = v;
  2 件のコメント
hasan alhussaini
hasan alhussaini 2018 年 3 月 8 日
Thank you so much!
Stephen23
Stephen23 2018 年 3 月 8 日

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by