Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to put a 3D element in every place of a 3D matrix?

1 回表示 (過去 30 日間)
JAI PRAKASH
JAI PRAKASH 2018 年 8 月 2 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
How can I perform this?
im1(1:10, 1:10, :) = im2(1, 1, :);
RHS is a 3D element, basically RGB.
It can be done by:
zoomIm(1:10, 1:10, 1) = im(1, 1, 1);
zoomIm(1:10, 1:10, 2) = im(1, 1, 2);
zoomIm(1:10, 1:10, 3) = im(1, 1, 3);
But is there any efficient way??

回答 (1 件)

Guillaume
Guillaume 2018 年 8 月 2 日
im1(1:10, 1:10, :) = repmat(im2(1, 1, :), [10, 10, 1]);
  3 件のコメント
Guillaume
Guillaume 2018 年 8 月 3 日
Well, then use the conventional approach. There won't be anything simpler.
JAI PRAKASH
JAI PRAKASH 2018 年 8 月 3 日
Ok
Thanx anyways :D

この質問は閉じられています。

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by