substitute one cell of 3D matrix with another cell

2 vues (au cours des 30 derniers jours)
talayeh ghodsi
talayeh ghodsi le 26 Mai 2019
Commenté : talayeh ghodsi le 26 Mai 2019
Hi every body.
I have a 512*512*368 matrix which consist of 368 images of size 512*512. I want to delet the 158th image in the matrix and replace it with another image which is 2D image and the same size az 512*512. Could you please tell me how can i do it?
BRG

Réponse acceptée

Stephan
Stephan le 26 Mai 2019
Modifié(e) : Stephan le 26 Mai 2019
A(:,:,158) = I; % where I is the 512x512 image you want to insert
  4 commentaires
Stephan
Stephan le 26 Mai 2019
This message should not appear, if things are fine - see this simple example:
I = [1 3; 2 4]
A = zeros(2,2,4)
A(:,:,3) = I
talayeh ghodsi
talayeh ghodsi le 26 Mai 2019
Thanks a lot, it works

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by