# intarpulation on a sin wall

5 views (last 30 days)
ran on 7 Jun 2024
Edited: ran on 8 Jun 2024
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 on 7 Jun 2024
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.)
ran on 7 Jun 2024
Edited: ran on 8 Jun 2024
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