How to do quadratic interpolation in two dimensions on a plane

조회 수: 14 (최근 30일)
Kayson Christensen
Kayson Christensen 2022년 5월 19일
댓글: Matt J 2022년 5월 27일
I'm working on a project which analyzes the air velocity in front of a fan. We took measurments at various positions on an x-y plane placed perpendicular to the air flow, and read velocity in the z-direction only. I tried to create a surface plot to help visually show what the flow is like, but since I only have a few data points it looked really jagged. I then tried to use the interp2 function to try and smooth out the points but it came out like this:
I realize the interp2 is a linear interpolation technique, but is there a way we could do a quadratic fit in two dimensions? Since this should look more like a bell curve, as you would expect. All of this data is recorded in matricies, with identical x and y matricies for the plane, and a U matrix for the velocities. I appreciate any help I can get!
  댓글 수: 7
Torsten
Torsten 2022년 5월 25일
As it seems, the planes are in the direction of the outcoming air and not perpendicular to it ? In 1.jpg, one velocity direction (U,V or W) is listed ?
Kayson Christensen
Kayson Christensen 2022년 5월 27일
The planes are set parallel with the flow from the fans (as if you're looking down on the full setup). In that photo, the U velocity direction was shown. There are two more charts like in that photo recording the data for V and W at the same plane. It's a complicated setup, but I found it was the easiest way of recording accurate data.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2022년 5월 24일
I realize the interp2 is a linear interpolation technique
No, you have several alternatives to linear interpolation with interp2,
Maybe try with 'cubic'?
  댓글 수: 2
Kayson Christensen
Kayson Christensen 2022년 5월 27일
That worked perfectly! Pardon my inexperience with the software, I didn't even realize you could use multiple methods with the interp2 command. Thank you!
Matt J
Matt J 2022년 5월 27일
You're quite welcome but please Accept-click the answer to indicate that it worked.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by