Too many input arguments ERROR

>>Error using == Too many input arguments.
Error in readSTLexp5 (line 356)
if(Q{1,f}{S,4} == Q{1,f}{S,3})
I m getting above error while comparing two elements of cell. Can anyone explain??
Thanks in advance

 채택된 답변

Matt J
Matt J 2013년 7월 15일

0 개 추천

Perhaps you meant this instead
if(Q(1,f){S,4} == Q(1,f){S,3})

댓글 수: 5

siddhesh rane
siddhesh rane 2013년 7월 15일
I tried it..It is giving following error..
>> ()-indexing must appear last in an index expression.
siddhesh rane
siddhesh rane 2013년 7월 15일
편집: siddhesh rane 2013년 7월 15일
I want to compare elements say Q{1,1}{1,2} and Q{1,1}{1,3} of the cell for equality..I used same syntax as above previously for addressing cell element.
The issue depends a lot on what the cell array Q contains (and what data type). However, here are some possibly relevant examples of things you can and cannot do with cells.
>> p={1,2,3}; q={1,2,5}; %fake data
>> p{3}==q{3} %Can do
ans =
0
>> p{2:3}==q{2:3} %Can't do
Error using ==
Too many input arguments.
>> [p{2:3}]==[q{2:3}] %Can do.
ans =
1 0
siddhesh rane
siddhesh rane 2013년 7월 15일
thanks for the help. May be problem is with other part of code.
Matt J
Matt J 2013년 7월 15일
편집: Matt J 2013년 7월 15일
Hurray!! You pushed me over the 3000 rep points threshold. Thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

태그

질문:

2013년 7월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by