How to compare two cell elements in matlab?

1 visualización (últimos 30 días)
Monisha
Monisha el 12 de Abr. de 2014
Respondida: Azzi Abdelmalek el 12 de Abr. de 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?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 12 de Abr. de 2014
Use curly brackets
amp1=cinfo{1,1};
amp2=cinfo{1,2};

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by