How to interpolate attached data with the interval of 0.1524?

조회 수: 1 (최근 30일)
Nisar Ahmed
Nisar Ahmed 2021년 11월 8일
답변: DGM 2021년 11월 8일
Hi,
I have attached a data set (depth vs pressure). Depth starts from 1917.1254 and ends 1967.5698 m with nonuniform interval. I want to interpolate depth and pressure with the interval of 0.1524.
I need to interpolate both depth and pressure at the interval of 0.1524.

답변 (1개)

DGM
DGM 2021년 11월 8일
Something like this:
DP = readmatrix('DepthVSpressure.txt');
D_refined = min(DP(:,1)):0.1524:max(DP(:,1));
P_refined = interp1(DP(:,1),DP(:,2),D_refined);
plot(D_refined,P_refined)

카테고리

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