필터 지우기
필터 지우기

What is command for row echelon form of a matrix in MATLAB

조회 수: 53 (최근 30일)
Ansha Nawaz
Ansha Nawaz 2017년 10월 21일
댓글: Nagabhushan SN 2019년 9월 19일
A = 3 -1 0 4 1 2 0 3 3 -1 >> ref(A) ??? Undefined function or method 'ref' for input arguments of type 'double'.

채택된 답변

John D'Errico
John D'Errico 2017년 10월 21일
Perhaps you are thinking of rref?
help rref
When you don't know the name of a function, learn to use lookfor. For example, when applied to the word "echelon", it returns this:
>> lookfor echelon
rref - Reduced row echelon form.
  댓글 수: 1
Ansha Nawaz
Ansha Nawaz 2017년 10월 21일
John D'Errico I have to apply Guass elimination,not Gauss-Jordan Elimination.
So, i just want echelon form not reduced echelon form

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Nagabhushan SN
Nagabhushan SN 2018년 10월 9일
lu(A)
performs LU factorization of a matrix. So, you can get upper triangular matrix from there. Not sure though if it performs Gauss reduction
[L,U,P] = lu(A);
  댓글 수: 2
Nathan Cleavinger
Nathan Cleavinger 2019년 9월 19일
Thanks, Nagabhushan.
I had the same question, and that's exatly what I needed.
U = upper matrix (which is the ref - what we really want)
L = lower matrix, which is the coefficients used to eliminate elements
(i.e. to eliminate the first element on the second row, we'd used
(E2 - m21* E1) -> E2
and L stores all of the m__ coefficients. This is helpful when using other methods to solve matrices)
I'm not sure what P does.
Nagabhushan SN
Nagabhushan SN 2019년 9월 19일
Hi Nathan, thanks for adding the details. Would help other people looking here.
And P is the permutation matrix. When you encounter a temporary breakdown when doing gauss elimination, you exchange the rows and proceed right, P captures that. In mathematical terms P*A = L*U

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by