how to connect interpolation and probability

1 vue (au cours des 30 derniers jours)
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA le 18 Sep 2021
starting from 3 distance values and 3 speed values I managed to create this grid by interpolating all the values (the colored points) and thus obtaining all the other speeds: new_speed = interp1 (distance, speed, new_distance, 'linear').
Now on each of these points I should add another information, that of probability. Also in this case I have only 3 information on probabilities, each relating to a speed and a distance. can anyone help me?
the code is:
prob_a=[10.48 23.31 23.46 18.20 11.50 6.99 2.77 1.02 0.32 0.05 10.48]; %55km-7m/s
prob_b=[6.76 14.58 15.19 12.47 8.20 5.12 2 0.75 0.24 0.03 6.76]; %500km-30m/s
prob_c=[0.36 0.54 0.36 0.15 0.06 0.01 0 0 0 0 0.36]; %667km-70m/s
z1 = calcola_dist
x = [0 55 500 667]; %distance
v = [0 7 30 70]; %velocity
xq = z1; %new distance
vq2 = interp1(x,v,xq,'linear');
plot(lonlatgrd(:,1),lonlatgrd(:,2),'.');
hold on
scatter(lonlatgrd(:,1),lonlatgrd(:,2),20,vq2,'filled');
colormap hsv
colorbar
title('new velocity m/s')
  2 commentaires
darova
darova le 19 Sep 2021
THe question is unclear. You are trying to visualize something?
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA le 19 Sep 2021
yes, I am trying to always display the probability values on the colored points. but also in this case, as for velocities, I only have 3 arrays of probability values. I tried to use the interp1 function in this case too but it doesn't work. Can anyone help me? is the question clearer?

Connectez-vous pour commenter.

Réponses (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov le 19 Sep 2021
Some of your data, used in your code, are not provided here. Moreover, it is not quite clear "connect"? What you are trying to do is to see how much your interpolated data correlates with the probability data or something else?
  1 commentaire
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA le 19 Sep 2021
in the code and therefore also in the image I was able to calculate all the speeds through interpolation even in the points where I did not have the speed value. I would like to do the same for the odds. then create another graph where through 3 arrays of probability values, I can get the result for all the other points as well.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by