Borrar filtros
Borrar filtros

"Undefined function or method 'eq' for input arguments of type 'cell'."

2 visualizaciones (últimos 30 días)
Anfal
Anfal el 12 de Dic. de 2014
Respondida: Sean de Wolski el 12 de Dic. de 2014
i get "Undefined function or method 'eq' for input arguments of type 'cell'." error in this statment find(compare==max(compare)) , compare is a cell .. any help ?

Respuestas (1)

Sean de Wolski
Sean de Wolski el 12 de Dic. de 2014
You can't take the max of a cell, it's a container. If you want the max of all of the elements in the cell, use cellfun
mxc = cellfun(@(x)max(x(:)),your_cell)
mxc will be the max of each cell and you can then use your above code to figure out which ones are the mask.

Categorías

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