Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

1 Ansicht (letzte 30 Tage)
JAI PRAKASH
JAI PRAKASH am 2 Aug. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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??

Antworten (1)

Guillaume
Guillaume am 2 Aug. 2018
im1(1:10, 1:10, :) = repmat(im2(1, 1, :), [10, 10, 1]);
  3 Kommentare
Guillaume
Guillaume am 3 Aug. 2018
Well, then use the conventional approach. There won't be anything simpler.
JAI PRAKASH
JAI PRAKASH am 3 Aug. 2018
Ok
Thanx anyways :D

Diese Frage ist geschlossen.

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by