How to emtpy part of a matrix?

1 回表示 (過去 30 日間)
Terek Li
Terek Li 2016 年 10 月 17 日
コメント済み: Terek Li 2016 年 10 月 17 日
If I have a matrix like this :
a = [1 2; 3 4; 5 6; 7 8]
is there a quick way to remove '3' and '4' from the matrix so it looks like :
a = [1 2; [] 4; [] 6; 7 8]?
I only want to remove value in the 1st column starting on the 2nd row and ending at the 2nd last row.
THANKS!

採用された回答

Andrei Bobrov
Andrei Bobrov 2016 年 10 月 17 日
a = [1 2; 3 4; 5 6; 7 8];
a(2:3,1) = nan;
  1 件のコメント
Terek Li
Terek Li 2016 年 10 月 17 日
perfect, thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by