matrix=[100 130;150 230; 250 270; 275 285; 290 315] x= 225 ;
idx = matrix(:,1)<=x & matrix(:,2)>=x iwant = matrix(idx,:)
matrix=[100 130;150 230; 250 270; 275 285; 290 315] x= 225 ;
idx = matrix(:,1)<=x & matrix(:,2)>=x iwant = matrix(idx,:)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!