フィルターのクリア

How to create a matrix?

1 回表示 (過去 30 日間)
jack star
jack star 2016 年 4 月 2 日
コメント済み: jack star 2016 年 4 月 2 日
Hi all, I am trying to create a matrix (101x101) like this :
Can anyone help me with the code please?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 2 日
編集済み: Azzi Abdelmalek 2016 年 4 月 2 日
n=4 % in your case use n=101
out=tril(2*ones(n),-1)
  1 件のコメント
jack star
jack star 2016 年 4 月 2 日
Thank you very much for your answer.
Now I'm trying to solve this matrix:
Y= U x g
% Y(101x1) and U(101x101) matrixes.
to find g, i used this g = inv(U)*Y
But it found g(101x1) NaN matrix. You have any idea why?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by