1

私は5x5行列 M = magic(5) and I must add two sub-matrices of it (using thesum command) and store it inG` を持っています。

M(1:3,1:3)M(3:5,3:5)

そして、私はこれを書きましたが、それが正しいかどうかはわかりませんが、

G=sum(M([1:3,1:3],[3:5,3:5])); 
4

1 に答える 1