"find" function doesn't work
4 ビュー (過去 30 日間)
古いコメントを表示
Hi~ I got a weird problem here. See the attached picture. "find" works for some values and doesn't for some others. It could a stupid question but can anybody help? Thanks a lot!
So the wavelength vector "lem" has some value but "find" can't find it.
The following is what happens in the command window. It can find the number value but can't find the variable x which equals that value.
>> x
x =
507.0350
>> jj = find(lem==x)
jj =
Empty matrix: 1-by-0
>> jj = find(lem==507.0350)
jj =
3408
0 件のコメント
採用された回答
Walter Roberson
2011 年 10 月 4 日
find() works fine. Your array does not contain the value in x. If you were to try
lem(3408) - x
you would find that the result is non-zero.
6 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!