필터 지우기
필터 지우기

How to create a matrix?

조회 수: 3 (최근 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 CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by