How can i interpolate this data?
이전 댓글 표시
Greetings to you all.
I'm trying to analise some data from an ADCP (Acoustic Doppler Current Profiler). For that, i must process the data.
My matrix works on this way:
Each Row has intensity values
Each column has a certain height in relation to the bottom of the water column.
example:
0 NaN 0.5 0.3 0.7 0.9
0 NaN 0.7 0.4 0.5 0.8
0 NaN 0.9 0.1 0.4 0.5
0 NaN 1.0 0.4 0.3 0.2
The second column is equivalent a 1m height from the bottom and the instrument has not registered those values because of an error. I want to interpolate them.
Appreciate any kind of help.
채택된 답변
추가 답변 (1개)
Keegan Carvalho
2022년 4월 19일
편집: Keegan Carvalho
2022년 4월 19일
I'd assume "fillmissing" function would be best since you want to inteprolate the data row-wise (and this is not gridded interpolation).
Try this:
mydata = [0 NaN 0.5 0.3 0.7 0.9
0 NaN 0.7 0.4 0.5 0.8
0 NaN 0.9 0.1 0.4 0.5
0 NaN 1.0 0.4 0.3 0.2];
mydata=fillmissing(mydata,"linear",2)
% linear is one of the inteprolation methods you can use. There are others like spline, nearest, etc.
% 2 means inteprolation of data in each row of mydata. 1 - column
Hope this helps!
댓글 수: 1
Gabriel Luca Pugliese Borges
2022년 4월 19일
편집: Gabriel Luca Pugliese Borges
2022년 4월 19일
카테고리
도움말 센터 및 File Exchange에서 Interpolation of 2-D Selections in 3-D Grids에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

