How to interpolate one axis in a 3D data?

I have a data dats.mat attached here in which ss is of size 139 48 9. Here 9 is number of vertical layers and I want to digitize and interplotate 9 layers say equal to 100 layers (e.g., 1:100). How can I interpolate only 1D dimension in MATLAB keep \ing all the others same?

 Akzeptierte Antwort

Matt J
Matt J am 4 Mär. 2024
Bearbeitet: Matt J am 4 Mär. 2024

0 Stimmen

load dats;
F=griddedInterpolant(ss);
ss=F({1:139,1:48, linspace(1,9,100)});

3 Kommentare

Matt J
Matt J am 4 Mär. 2024
Verschoben: Matt J am 4 Mär. 2024
You could also download imresizen (distinct from imresize3)
to do this in one step,
ss=imresizen(ss,[1,1,100]);
Ahmed
Ahmed am 4 Mär. 2024
@Matt J Thanks if I use this ss=imresizen(ss,[1,1,100]);, 9 will be multiplied with 100 and there will 900 layers e.g., final size will 139 48 900. Is it like this?
Sorry, no, I meant
ss=imresizen(ss,[1,1,100/9])

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 4 Mär. 2024

Kommentiert:

am 4 Mär. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by