Predicting the curve(Graph) among a family of the curve(Graph)
2 views (last 30 days)
Show older comments
Im doing a project and in that i came across a situation where i have to predict/draw the graph
a20=[0.048332 4.591866 9.473681 15.321958 19.962203 24.602355 29.870829 35.139303 39.827975 43.694854 49.108419 54.667355 59.839772 63.803829 69.266568 74.729587 79.854512 84.737821 90.057151 96.102356 99.875466]
vel20=[0.00016 0.978174 1.789824 1.936022 3.079598 3.892049 4.702419 5.512789 6.987331 7.967905 9.108921 11.57396 14.536968 17.338414 21.459402 26.573768 32.517068 38.626732 48.377339 61.271242 72.517036]
a10=[0.338654 4.54365 9.957192 14.8391 20.059382 25.231238 29.823197 35.236903 39.974 45.726219 50.753592 55.684393 59.793775 63.419693 69.222394 74.977463 79.814589 83.926775 89.201323 95.348518 99.802348]
vel10=[1.15782 1.392241 2.450475 3.593251 4.90047 5.876723 7.186023 8.823727 10.629235 12.928071 15.725996 18.855367 22.815274 26.280092 36.194662 48.592835 62.318553 76.212234 98.545783 130.313537 155.961065]
for some k=20 i know plot(a20,vel20)
for some k=10 i know plot(a10,vel10)
now for some k=17.9 i wanna know the plot of(a17.9,vel17.9)
is it possible....can any one help me out plz...
3 Comments
Jing
on 23 May 2013
T in last comment is k in the original post? If so, my comment still applies to your question...
Accepted Answer
José-Luis
on 23 May 2013
You could interpolate linearly between the two curves:
a20=[0.048332 4.591866 9.473681 15.321958 19.962203 24.602355 29.870829 35.139303 39.827975 43.694854 49.108419 54.667355 59.839772 63.803829 69.266568 74.729587 79.854512 84.737821 90.057151 96.102356 99.875466];
vel20=[0.00016 0.978174 1.789824 1.936022 3.079598 3.892049 4.702419 5.512789 6.987331 7.967905 9.108921 11.57396 14.536968 17.338414 21.459402 26.573768 32.517068 38.626732 48.377339 61.271242 72.517036];
a10=[0.338654 4.54365 9.957192 14.8391 20.059382 25.231238 29.823197 35.236903 39.974 45.726219 50.753592 55.684393 59.793775 63.419693 69.222394 74.977463 79.814589 83.926775 89.201323 95.348518 99.802348];
vel10=[1.15782 1.392241 2.450475 3.593251 4.90047 5.876723 7.186023 8.823727 10.629235 12.928071 15.725996 18.855367 22.815274 26.280092 36.194662 48.592835 62.318553 76.212234 98.545783 130.313537 155.961065];
plot(a10,vel10,'b-');
hold on
plot(a20,vel20,'g-');
minX = min([a10 a20]);
maxX = max([a10,a20]);
xx = linspace(minX,maxX,100);
vel10_inter = interp1(a10,vel10,xx);
vel20_inter = interp1(a20,vel20,xx);
val = 17.6; % change here
interpVel = vel10_inter + ((val-10).*(vel20_inter-vel10_inter))./(20-10);
plot(xx,interpVel,'r-');
1 Comment
More Answers (0)
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!