how to find y axis value's opposite x axis value
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
for ex:x=1,2,3,4,5,6;y=2,7,8,9,4,1 i want pick up the y axis (9) opposite x axis value
0 Commenti
Risposta accettata
KL
il 29 Apr 2015
If both vectors are of same size, find the index of your variable from y and use it to pick the value at that position in x. A simple example is
x = [1 2 3 4];
y = [5 6 7 8];
ind = find(y==7);
x(ind);
2 Commenti
Più risposte (1)
Ilham Hardy
il 29 Apr 2015
>> x=[1,2,3,4,5,6];
>> y=[2,7,8,9,4,1];
>> opp_x = x(y==9)
opp_x =
4
0 Commenti
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!