Interpolate from curve data

1 次查看(过去 30 天)
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.

采纳的回答

Titus Edelhofer
Titus Edelhofer 2016-2-25
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

更多回答(1 个)

Titus Edelhofer
Titus Edelhofer 2016-2-25
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 个评论
Daniel
Daniel 2016-2-25
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by