Error message Undefined variable isnan

7 visualizaciones (últimos 30 días)
Ursula
Ursula el 18 de Oct. de 2012
Hi,
I am new to using mathlab so apologies if this is obvious.
for i=1:2705
borntime(i)=min(find(~isnan(final_n(i),:)))
end
I am getting an error message saying undefined variable isnan.
If anyone could help me it would be great.
Final_n is a matrix of 2705x1209.
Thanks.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 18 de Oct. de 2012
Editada: Azzi Abdelmalek el 18 de Oct. de 2012
final_n=rand(2705,5);
for i=1:2705
borntime(i)=min(find(~isnan(final_n(i,:))));
end
the error was in
~isnan(final_n(i),:)
  3 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 18 de Oct. de 2012
it's just an example to test your code
Ursula
Ursula el 18 de Oct. de 2012
Thats perfect thanks!

Iniciar sesión para comentar.

Más respuestas (1)

Sean de Wolski
Sean de Wolski el 18 de Oct. de 2012
What is the output from:
which -all isnan
If nothing shows up:
rehash toolboxcache

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