Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
JAI PRAKASH
JAI PRAKASH il 2 Ago 2018
Chiuso: MATLAB Answer Bot il 20 Ago 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??

Risposte (1)

Guillaume
Guillaume il 2 Ago 2018
im1(1:10, 1:10, :) = repmat(im2(1, 1, :), [10, 10, 1]);
  3 Commenti
Guillaume
Guillaume il 3 Ago 2018
Well, then use the conventional approach. There won't be anything simpler.

Questa domanda è chiusa.

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by