Select values in the matrix based on the condition
4 views (last 30 days)
Turbulence Analysis on 29 Jun 2022
I have two matrix A and B of 94349 x 1.
Here the values in the matrix A are range from 0 to 1. First, I have to identify row numbers in the matrix A that got values only in the range of 0.05 to 0.06. Then I have to read values from matrix B that pertains to only the preselected rows from step 1.
NIVEDITA MAJEE on 29 Jun 2022
Edited: NIVEDITA MAJEE on 29 Jun 2022
You could do the following:
filtered_idx = find((A>=0.05 & A<=0.06)) %this will store the indexes from the matrix A which have values between 0.05 and 0.06
filtered_B = B(filtered_idx) %this will store the values corresponding to the indexes stored in filtered_idx
Hope this helps!