필터 지우기
필터 지우기

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 CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by