find x subjected to some limit.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to to find a<=x<b and c<=y<d in a matrix. But simply I can't. I would appreciate if you help me.
0 Kommentare
Akzeptierte Antwort
Thomas
am 30 Mai 2012
This might be what you need
q=rand(3,3); % generate 3x3 random matrix
a=0.1; b=0.3; c=0.5;d=0.9; %values of a b c and d
x=q(q>a&q<b) % to find value greater than a and less than b in matrix q
y=q(q>c&q<d) % to find value greater than c and less than d in matrix q
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!