Interpolate from curve data

2 visualizaciones (últimos 30 días)
Daniel
Daniel el 25 de Feb. de 2016
Respondida: Titus Edelhofer el 25 de Feb. de 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.

Respuesta aceptada

Titus Edelhofer
Titus Edelhofer el 25 de Feb. de 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

Más respuestas (1)

Titus Edelhofer
Titus Edelhofer el 25 de Feb. de 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
  1 comentario
Daniel
Daniel el 25 de Feb. de 2016
Hi Titus, Thanks a lot. This will work, but I'm looking at the function 'griddatan'.
I haven't figured out how exactly yet but I think this might be a good solution to my problem.

Iniciar sesión para comentar.

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by