I have X vector and Y vector. I have plotted graph. Now I sorted out some peak values (from Y). Stored in pks. Now, corresponding to these peaks values(pks), how I can find its corresponding X values?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sagar Dhage
am 1 Jul. 2014
Kommentiert: Sagar Dhage
am 2 Jul. 2014
I have X vector and Y vector. I have plotted graph. Now I sorted out some peak values (from Y). Stored in pks. Now, corresponding to these peaks values(pks), how I can find its corresponding X values?
0 Kommentare
Akzeptierte Antwort
Sara
am 1 Jul. 2014
If there is a biunivocal correspondence between X and Y (i.e. to each value of X corresponds only one value of Y and vice versa), then:
xpks = zeros(numel(pks),1);
for i = 1:numel(pks)
xpks(i) = pks(find(Y == pks(i),1));
end
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!