フィルターのクリア

Find brings back empty matrix

2 ビュー (過去 30 日間)
benny
benny 2014 年 11 月 20 日
編集済み: Azzi Abdelmalek 2014 年 11 月 20 日
When I use the find command the get back empty matrix: 0-by-1 for B and L,but I get an answer for R. help please thanks
This is my code
clear,clc
load rocket.dat
B= rocket(:,4);
R= rocket(:,2);
L= rocket(:,3);
(find(L<40 & L>60))
(find(B<100 & B>200))
(find(R<115 & R<125))
This is the data in rocket.dat for reference
1.0000000e+000 1.1600000e+002 4.5000000e+001 1.1000000e+002
2.0000000e+000 1.1400000e+002 4.2000000e+001 1.1500000e+002
3.0000000e+000 1.1800000e+002 4.1000000e+001 1.2000000e+002
4.0000000e+000 1.2400000e+002 3.8000000e+001 9.5000000e+001
5.0000000e+000 1.2600000e+002 6.1000000e+001 1.1800000e+002

採用された回答

Ahmet Cecen
Ahmet Cecen 2014 年 11 月 20 日
That is because a number cant be bigger than 60 and lower than 40 at the same time:
L<40 & L>60
You need to figure out what range you are actually interested in, and either flip those inequalities or use OR instead of AND.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by