How to delete the last rows and columns?

3 ビュー (過去 30 日間)
Omar B.
Omar B. 2020 年 2 月 21 日
コメント済み: Adam 2020 年 2 月 21 日
How to delete the last three rows and three columns from the following matrix without change N and then multiply the last off diagonal by 6?
then how can we store the new matrix?
M = zeros(N,N);
>> M( 1:1+N:N*N) = a;
>> M(N+1:1+N:N*N) = b;
>> M( 2:1+N:N*N-N) = c
M =
-1 4 0 0 0 0 0 0 0 0
2 -1 4 0 0 0 0 0 0 0
0 2 -1 4 0 0 0 0 0 0
0 0 2 -1 4 0 0 0 0 0
0 0 0 2 -1 4 0 0 0 0
0 0 0 0 2 -1 4 0 0 0
0 0 0 0 0 2 -1 4 0 0
0 0 0 0 0 0 2 -1 4 0
0 0 0 0 0 0 0 2 -1 4
0 0 0 0 0 0 0 0 2 -1
  2 件のコメント
darova
darova 2020 年 2 月 21 日
What about this?
Adam
Adam 2020 年 2 月 21 日
What is 'the last' off diagonal?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by