Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は5x5行列 M = magic(5) and I must add two sub-matrices of it (using thesum command) and store it inG` を持っています。
5x5
and I must add two sub-matrices of it (using the
command) and store it in
M(1:3,1:3)とM(3:5,3:5)
M(1:3,1:3)
M(3:5,3:5)
そして、私はこれを書きましたが、それが正しいかどうかはわかりませんが、
G=sum(M([1:3,1:3],[3:5,3:5]));