how to resample a data from 37 layers to 34 layers?

조회 수: 1 (최근 30일)
Sreeraj R
Sreeraj R 2021년 11월 16일
댓글: Sreeraj R 2021년 11월 16일
hi
i have a data in the format of 1076x915x37, however for my analysis i need it to be in 1076x915x34. how do i resample the layers in the data?
i tried using resample but didnt quite understand how it worked.

채택된 답변

KSSV
KSSV 2021년 11월 16일
편집: KSSV 2021년 11월 16일
Read about interpn.
A = rand(1076,915,34) ;
[m,n,p] = size(A) ;
[X,Y,Z] = ndgrid(1:m,1:n,1:p) ;
[Xi,Yi,Zi] = ndgrid(1:m,1:n,linspace(1,p,37)) ;
B = interpn(X,Y,Z,A,Xi,Yi,Zi) ;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by