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 Center および File ExchangeData Import and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by