To find a value on x axis corresponding to a y value( found by interpolation) in a MATLAB plot
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a 57*61 array that has values in each row approximately between 40.21 to 94.34 in percentage. Each row is plotted against other vector of 1*61.
The values change unevenly in each row. Now I have to find two values that are close to 50. For first row they are at (1,6) and (1,7), but they change in each row, so how can I get the two values in each row in immediate proximity of 50. I then plan to use interpolation to find the x value (in the 1*61 vector) corresponding to the y value.
0 commentaires
Réponse acceptée
Jan
le 24 Mar 2018
For each row:
Result = zeros(1, 57);
for iCol = 1:57
Result(iCol) = interp1(Data(iCol, :), y, 50);
end
where y is your 1x61 vector.
But this replies 1 value for each column. Why do you want to find 2 values?
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Interpolation dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!