How do I iterate through columns to find specific values?
Show older comments
I have a matrix 391x518 and I need to extract numbers from said matrix that are between 200-255, including 200 and 255.
I am unsure of how to form this iteration and extract these values.
Answers (1)
KSSV
on 3 May 2019
Let A be your matrix.
idx = A>=200 & A<=255 ; % this gives logical indices
A(idx) % this gives all numbrs
Categories
Find more on Loops and Conditional Statements 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!