MATLAB: How to plot data associated with a certain value

prn cmc cmc_ub

Hey guys i have an observation file for a Navigation data and i have different PRN numbers that i need to plot. for example i have PRN (6,7,2,5,3,6,1,10,29), but the data is logged every second and the columns assosiated with the PRNs is not uniformed or sorted. my question is how can i group all the data lets say for PRN 6 and plot data only assoisated with PRN 6? my matrix is 2209 x 25
thank you

Best Answer

If A is 2209X25 matrix with PRN as second column.
PRN = A(:,2) ; % Pick second column
idx = PRN==6 ; %Get indices of 6 in PRN
iwant = A(idx,:)