Error message Undefined variable isnan

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.

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 10 月 18 日
編集済み: Azzi Abdelmalek 2012 年 10 月 18 日

0 投票

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 件のコメント

Ursula
Ursula 2012 年 10 月 18 日
Thanks a million for that. What exactly does the
final_n=rand(2705,5);
line do?
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 10 月 18 日
it's just an example to test your code
Ursula
Ursula 2012 年 10 月 18 日
Thats perfect thanks!

サインインしてコメントする。

その他の回答 (1 件)

Sean de Wolski
Sean de Wolski 2012 年 10 月 18 日

0 投票

What is the output from:
which -all isnan
If nothing shows up:
rehash toolboxcache

カテゴリ

ヘルプ センター および File ExchangeSignal Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by