Interpolate matrix in 4D
51 ビュー (過去 30 日間)
古いコメントを表示
I have a matrix data of size 20,10,20,10.
It is a 3D object that changes across time (10 time points which represent 10 seconds)
I would like to create a smooth transition interpolating values to subdivide those 10 seconds into e.g., 10th of a second, so 100 time points in total.
How to go about this in Matlab?
0 件のコメント
回答 (1 件)
Matt J
2023 年 3 月 8 日
3 件のコメント
Matt J
2023 年 3 月 8 日
編集済み: Matt J
2023 年 3 月 8 日
what does the [1,1,1,10] mean?
It means make the 4th dimension 10 times bigger.
I want to preserve the values in A(:,:,:,1) and in A(:,:,:,10), which must be identical to the values in the Ainterp(:,:,:,1) and Ainterp(:,:,:,100). And the new values should be interpolated accordingly.
griddedInterpolant will do that.
A=rand(20,10,20,10);
F=griddedInterpolant(A);
Ainterp=F({1:20,1:10,1:20,linspace(1,10,100)});
whos A Ainterp
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!