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

1 visualización (últimos 30 días)
Sreeraj R
Sreeraj R el 16 de Nov. de 2021
Comentada: Sreeraj R el 16 de Nov. de 2021
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.

Respuesta aceptada

KSSV
KSSV el 16 de Nov. de 2021
Editada: KSSV el 16 de Nov. de 2021
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) ;

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by