Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to get the output for the below code
1 次查看(过去 30 天)
显示 更早的评论
could anyone help me how to get the output.
siz = size(G)
idx = sub2ind(siz, randi([1,4], 1, siz(2)), 1:siz(2));
C = zeros(siz);
C(idx) = G(idx)
B = reshape(repmat(max(reshape(C,2,[])),C,1),size(C))
where G and C are attached as image
4 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!