Borrar filtros
Borrar filtros

Data type error using 'find'

2 visualizaciones (últimos 30 días)
Manuel
Manuel el 26 de Ag. de 2013
I have a list of double values(Test.TempCcol_10) in which one I want to find the indexes where the doubles values match with cond1(cell type since is taken from a listbox).
list1 = find(cell2mat(Test.TempCcol_10) == cond1)
If I introduced the cond1 as a double the command works perfectly but when cond1 is taken from a listbox I got the next error:
Undefined function 'eq' for input arguments of type 'cell'.
Error in plot_project(line 29)
list1 = find(cell2mat(Test.TempCcol_10) == cond1);
I tried to convert the cond1 but without succes.
Thanks in advance.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 26 de Ag. de 2013
Try this
list1 = find(cell2mat(Test.TempCcol_10) == str2double(cond1));
  1 comentario
Manuel
Manuel el 26 de Ag. de 2013
Thanks Azzi, was easier that i thought!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical 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