フィルターのクリア

Error : Matrix Cell Array

1 回表示 (過去 30 日間)
baby
baby 2012 年 10 月 17 日
Hi all,,
i got error in my code,,
it tolds "Cell contents reference from a non-cell array object."
this is my code
a= input ('The number of participant :');
for c=1:a
str1 = ['Input Your Name :']; % build strings
str2 = ['Input Your First Score :'];
str3 = ['Input Your Second Score :'];
str4 = ['Input Your Third score :'];
b{c,1} = input(str1,'s');
b{c,2} = input(str2);
b{c,3} = input(str3);
b{c,4} = input(str4);
end
disp(b)
[m,n]= size (b);
Mb=max([b{:,2}])
for i=1:c
for j=1:3
R{i,j}=Mb{:,j}/b{i,j};
end
end
That error pointing at R{i,j}=Mb{:,j}/b{i,j};
anybody knows what's my fault?
please help me :)

回答 (1 件)

Matt J
Matt J 2012 年 10 月 17 日
編集済み: Matt J 2012 年 10 月 17 日
Mb is not a cell array, so you can't index it with the syntax Mb{:,j}.
  2 件のコメント
baby
baby 2012 年 10 月 17 日
so what can i do to fix it?
can you help me with fix my code?
i really need ur help :(
Matt J
Matt J 2012 年 10 月 17 日
編集済み: Matt J 2012 年 10 月 17 日
If my answer above didn't clear everything up for you, the best help that I can give you is this:

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

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by