How do I reinterpolate density into uniform depth values?

조회 수: 1 (최근 30일)
Shayma Al Ali
Shayma Al Ali 2020년 12월 7일
답변: Ashish Mishra 2020년 12월 11일
I have density values from ~245 files from hydrographic data. So each file contains a list of density values with depth. I want to reinterpolate the density values for each file to have uniform depth values so I can calculate drho/dx.

답변 (1개)

Ashish Mishra
Ashish Mishra 2020년 12월 11일
Hi Shayma
1 . Read the data in a table using readtable. and combine them.
2 . Store the values in variables like X=A(:,1);
3. Generate new sets of X value with the help of linspace.
4. Use interp1 as well mention whch kind of interpolation you want (spline,cubic or linear), This function
will return the new set of interpolated values.
Keep on plotting values to visualize better.

카테고리

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