Taking one dimension of a matrix

26 次查看(过去 30 天)
I have a 972X48X128 matrix double, and I want to save the first 2D matrix of the 3D matrix in another variable of dimension 1X48X128.
How do I accomplish this?

采纳的回答

Dyuman Joshi
Dyuman Joshi 2023-2-2
in = rand(972,48,128);
out = in(1,:,:);
size(out)
ans = 1×3
1 48 128

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by