How to split a 2xN matrix into multiple 2x2 matrices?
2 次查看(过去 30 天)
显示 更早的评论
How to split a 2xN matrix into multiple 2x2 matrices? and multiply them.
0 个评论
采纳的回答
Dyuman Joshi
2024-3-19
%Assuming N is a multiple of 2
y = randi(10, 2, 16)
%Reshaping into 2x2 blocks
y = reshape(y, 2, 2, [])
z = y(:,:,1);
for k=2:size(y,3)
z = z*y(:,:,k);
end
z
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!