How can I get the numbers from a vector?

3 Ansichten (letzte 30 Tage)
Hüseyin
Hüseyin am 21 Dez. 2014
Kommentiert: Hüseyin am 21 Dez. 2014
X= rand(50,1)*(100-1)+1 I produced 50 random numbers between 1-100 with this code in a vector. I want to write the numbers between 45-50 to another vector.

Akzeptierte Antwort

Matt J
Matt J am 21 Dez. 2014
anothervector=X(X>=45 & X<=50);

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by