How to compare two cell elements in matlab?

1 Ansicht (letzte 30 Tage)
Monisha
Monisha am 12 Apr. 2014
Beantwortet: Azzi Abdelmalek am 12 Apr. 2014
I am using two cells for storing the targeted and the expected value of a neural network process in matlab. I have used two 1*1 cell array for storing the values respectively. And here is my code.
cinfo=cell(1,2)
cinfo(1,1)=iter(1,10)%value is retrieved from a dataset iter
cinfo(1,2)=iter(1,11)
amp1=cinfo(1,1);
amp2=cinfo(1,2);
if amp1 == amp2
message=sprintf('NOT DETECTED BY THE DISEASE');
uiwait(msgbox(message));
But when i run the above code, the get the following error :
??? Undefined function or method 'eq' for input arguments of type 'cell'.
Error in ==> comparison at line 38
if amp1 == amp2
How to solve this problem?

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 12 Apr. 2014
Use curly brackets
amp1=cinfo{1,1};
amp2=cinfo{1,2};

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by