필터 지우기
필터 지우기

Interpolate from curve data

조회 수: 1 (최근 30일)
Daniel
Daniel 2016년 2월 25일
답변: Titus Edelhofer 2016년 2월 25일
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