How to pick out the x-values for their corresponding y-values ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Schirin Sellmann
am 25 Okt. 2017
Kommentiert: Darshika Gumare
am 31 Jan. 2019
Hi, I have two 1031X1 matrices, one represents the x-, the other one the y-values for a profile graph. I need the corresponding value couples where the y-values exceed a certain RMSE. I know how to get the y-values but how do I extract the right x-values?
Thanks a lot again!
0 Kommentare
Akzeptierte Antwort
KSSV
am 25 Okt. 2017
Get the indices of y satisfying the condition, pick the x values of those indices. Simple.
x = rand(100,1) ;
y = rand(100,1) ;
%%pick x satisfying certain condition of y
idx = y>0.8 ;
iwant = [x(idx) y(idx)]
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!