Interpolate from curve data
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Daniel
le 25 Fév 2016
Réponse apportée : Titus Edelhofer
le 25 Fév 2016
Hi,
I have this curve.
From this curve I can determine the life of a prop shaft due to gyroscopic forces at different yaw angles and certain speeds. I performed curve fitting on data points to get accurate high order polynomials for this interval of yaw angles. The polynomials are as follows,
y_150 = @(x) 22*((x-23)/4.9)^4 - 48*((x-23)/4.9)^3 + 27*((x-23)/4.9)^2 - 37*((x-23)/4.9) + 40;
y_200 = @(x) 11*((x-19)/4.8)^4 - 48*((x-19)/4.8)^3 + 73*((x-19)/4.8)^2 - 72*((x-19)/4.8) + 48;
y_212 = @(x) 23*((x-19)/4.8)^4 - 43*((x-19)/4.8)^3 + 22*((x-19)/4.8)^2 - 40*((x-19)/4.8) + 41;
But what about at 180 knots? Or 205 knots? Can I do some sort of 3 dimensional interpolation to account for different speeds? Since it is not considered good enough to use the closest speed value.
I would appreciate ANY ideas or comments on this problem.
0 commentaires
Réponse acceptée
Titus Edelhofer
le 25 Fév 2016
Hi Daniel,
What about this?
% define the polynomials
y_150 = @(x) 22*((x-23)/4.9).^4 - 48*((x-23)/4.9).^3 + 27*((x-23)/4.9).^2 - 37*((x-23)/4.9) + 40;
y_200 = @(x) 11*((x-19)/4.8).^4 - 48*((x-19)/4.8).^3 + 73*((x-19)/4.8).^2 - 72*((x-19)/4.8) + 48;
y_212 = @(x) 23*((x-19)/4.8).^4 - 43*((x-19)/4.8).^3 + 22*((x-19)/4.8).^2 - 40*((x-19)/4.8) + 41;
% define a grid
x = linspace(9, 25, 20);
y = [150 200 212]';
z = [y_150(x); y_200(x); y_212(x)];
% and interpolate at e.g. 180, 205
[X,Y,Z] = griddata(x, y, z, x, [180 205]');
% looks pretty good :)
plot(x, y_150(x), x, Z(1,:), x, y_200(x), x, Z(2,:), x, y_212(x))
legend('150','180','200','205','212')
Titus
0 commentaires
Plus de réponses (1)
Titus Edelhofer
le 25 Fév 2016
Hi,
the simplest way would be linear interpolation between two curves, e.g. for 180:
y_180 = @(x) ((200-180)*y_150(x) + (180-150)*y_200(x))/(200-150);
Titus
Voir également
Catégories
En savoir plus sur Polynomials 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!