How to extract a part of a matrix with condition in Matlab

1 view (last 30 days)
I have a sat of matrices and I want to extract only a part of the matrix that satisfy a condition.
For example: values of the 150x180 matrix goes from 0 to 2.80 and I only want thos between 1.66 and 1.77
can anybody help me please.
Thank you

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 8 Oct 2012
x = your_matrix;
out = x.*(x>=1.66&x<=1.77);

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!