Interpolation between multi curves
Ältere Kommentare anzeigen
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 Kommentare
Akira Agata
am 16 Feb. 2017
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
am 16 Feb. 2017
Stephen23
am 16 Feb. 2017
"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).
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Interpolation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
