intarpulation on a sin wall

2 次查看(过去 30 天)
I have a large data set and want to interpolate it; I am using this code to do so. Is there bater way or method to do so? My wave amplitude is 3.6mm, and length is 28.8 mm, which is very short. Any idea? i see some people segest Karnels intepulation? (i dont see a point to uplode any data it really simpal 2D data of velocity in a wavy tunnel, just want any good idea of intarpulations). i have large amount of waves and measurments so i need to be fast as well.
F_u = scatteredInterpolant(section_x(:), section_y(:), section_u(:), 'linear', 'none');
Unrecognized function or variable 'section_x'.
interp_u = F_u(interp_x, interp_y);
F_v = scatteredInterpolant(section_x(:), section_y(:), section_v(:), 'linear', 'none');
interp_v = F_v(interp_x, interp_y);
F_T = scatteredInterpolant(section_x(:), section_y(:), section_T(:), 'linear', 'none');
interp_T = F_T(interp_x, interp_y);
F_P = scatteredInterpolant(section_x(:), section_y(:), section_P(:), 'linear', 'none');
interp_P = F_P(interp_x, interp_y);
F_Tw = scatteredInterpolant(section_x(:), section_y(:), section_Tw(:), 'linear', 'none');
interp_Tw = F_Tw(interp_x, interp_y);

采纳的回答

Steven Lord
Steven Lord 2024-6-7
Just based on the code you showed, the main suggestion I have is not to recreate the scatteredInterpolant object every time. Just change the Values property to each of your different data sets. That way the effort to create the internal information necessary to perform the interpolation based on the coordinates (which are the same each time) doesn't need to be repeated. See the "Replacement of Sample Values" example on that documentation page.
Alternately if you're using release R2023b or later, you could use the functionality introduced in that release to "Interpolate multiple data sets simultaneously" (see the Version History section of the documentation page.)
  1 个评论
ran
ran 2024-6-7
编辑:ran 2024-6-8
thx i have a problem with the code now it super fast, the problem is that i have larg diclanation wich crate a wired steps on the wavy wall and i try to fined out a way to smoth it. i try everithing but i have a wavy wall that the non of matlab intarpulation data cent andel and i cent fine the solution anywere

请先登录,再进行评论。

更多回答(0 个)

类别

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