Interpolation between multi curves
显示 更早的评论
clc clear close all x=linspace(0,180,180)*pi/180
y200 = -0.0023.*x.^6 + 0.0296.*x.^5 - 0.1574.*x.^4 + 0.3502.*x.^3 - 0.1597.*x.^2 + 0.0567.*x - 0.0009;% 200 km y500 = -0.0019.*x.^6 + 0.0219.*x.^5 - 0.1172.*x.^4 + 0.2772.*x.^3 - 0.1297.*x.^2 + 0.0306.*x + 0.0001;% 500 km y1000 = -0.0029.*x.^6 + 0.0342.*x.^5 - 0.1786.*x.^4 + 0.4265.*x.^3 - 0.3061.*x.^2 + 0.0695.*x - 0.0033; % 1000 km
figure(1) plot(x,y1000,x,y500,x,y200)

I want to use the interpolation method to find the curves at any required altitude in the plot below, I already have the the polynomial of each curve as seen in the script
4 个评论
Akira Agata
2017-2-16
Let me clarify your question. If my understanding is correct, you have data set for each curve (each altitude). But data length is different for each curve. So you would like to adjust data size for each curve by interpolation.
In such a case, I think "spline" function will be helpful.
https://www.mathworks.com/help/matlab/ref/spline.html
Oday Shahadh
2017-2-16
Stephen23
2017-2-16
"what I want is to find a new curves for any altitude I want such as 300 or 4500 km"
My answer will give you exactly that.
@Oday Shahadh: you just edited your question into something totally different. This does not help because your original task (interpolating scattered data) was much simpler than this one.
Your idea of creating polynomials and then trying to interpolate them is more difficult than simply using an interpolant on your original data. Basically to interpolate the polynomials you would have to generate some data points... then you might as well use the original data points. So what you are trying to do is more complicated.
If you want more help I would suggest that you:
- revert back to your original question, with the original figure.
- upload sample data (this is the third time that you have been asked to provide sample data).
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
