how to connect interpolation and probability
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
Réponses (1)
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?
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!