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 Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by