Create a loop for this matrix
古いコメントを表示
1 -1 0 0 0 ...
-1 2 -1 0 0 ...
0 -1 2 -1 0 ...
0 0 -1 2 -1 ...
0 0 0 -1 2 ...
As you can see, this can go on forever, I and would like to find a way to write loop for a dynamic matrix where this just keeps going unitl a certain number 'N'
4 件のコメント
dpb
2021 年 6 月 4 日
What's the RH end condition definition?
Rayden Plasma
2021 年 6 月 4 日
David Fletcher
2021 年 6 月 4 日
編集済み: David Fletcher
2021 年 6 月 4 日
I think they are asking what the end of the final row should be - I would guess [zeros(N-2,1) -1 1]
Rayden Plasma
2021 年 6 月 4 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!