substitute one cell of 3D matrix with another cell

조회 수: 1 (최근 30일)
talayeh ghodsi
talayeh ghodsi 2019년 5월 26일
댓글: talayeh ghodsi 2019년 5월 26일
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

채택된 답변

Stephan
Stephan 2019년 5월 26일
편집: Stephan 2019년 5월 26일
A(:,:,158) = I; % where I is the 512x512 image you want to insert
  댓글 수: 4
Stephan
Stephan 2019년 5월 26일
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 2019년 5월 26일
Thanks a lot, it works

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by