How to reshape in 3D a downsampled matrix

3 次查看(过去 30 天)
Let's say I have this data:
factor=2;
data=zeros(40,20,74);
data(1:factor:end,1:factor:end,1:factor:end)=1;
Now, I would like to get a new "data" matrix just retaining the values "ones".
Thanks in advance,
TS

采纳的回答

Turlough Hughes
Turlough Hughes 2020-4-24
Easiest thing to do would be just this:
newData = data(1:factor:end,1:factor:end,1:factor:end);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by