三次元行列の足し算について

7 Ansichten (letzte 30 Tage)
shunya hara
shunya hara am 25 Sep. 2020
Kommentiert: shunya hara am 27 Sep. 2020
三次元行列の足し算についてお伺いしたいです。私は(2048,2048,300)でできた行列A,Bの要素の和を求めたいです。(A+Bをしました) その際に処理の終了後、(2048,2048,1),(2048,2048,2),(2048,2048,3)......のように完成した行列が画面上に羅列されました。大量の要素を有しているのでこの行列を羅列する作業を省きたいです。どうしたらよいですか?forを使うのがよいですか?
  1 Kommentar
shunya hara
shunya hara am 25 Sep. 2020
例えば C=A(3,3,3)+B(3,3,3) とうつと C(3,3,1)= C(3,3,2)= C(3,3,3)= というように羅列されます。この羅列がされない方法を知りたいです。

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

michio
michio am 25 Sep. 2020
C=A(3,3,3)+B(3,3,3);
のように最後にセミコロン(;)を付けると表示はされなくなります。
  1 Kommentar
shunya hara
shunya hara am 27 Sep. 2020
ありがとうございます!!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!