Replacing part of a matrix with a matrix

22 ビュー (過去 30 日間)
Nick
Nick 2014 年 9 月 23 日
コメント済み: Nick 2014 年 9 月 23 日
Hey guys,
I need to replace part of a matrix with a matrix of zeroes. For simplicity lets just say,
A = [1,2,3;4,5,6;7,8,9]
I would like to replace the top left 2x2 with a matrix of zeroes. How do I do this using matlab commands?
Thanks

採用された回答

Youssef  Khmou
Youssef Khmou 2014 年 9 月 23 日
you can try :
A(1:2,1:2)=0;
  1 件のコメント
Nick
Nick 2014 年 9 月 23 日
Thanks!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by