Borrar filtros
Borrar filtros

Find brings back empty matrix

2 visualizaciones (últimos 30 días)
benny
benny el 20 de Nov. de 2014
Editada: Azzi Abdelmalek el 20 de Nov. de 2014
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

Respuesta aceptada

Ahmet Cecen
Ahmet Cecen el 20 de Nov. de 2014
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.

Más respuestas (0)

Categorías

Más información sobre Workspace Variables and MAT-Files 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