필터 지우기
필터 지우기

inv matrix command error

조회 수: 1 (최근 30일)
Anthony Voccia
Anthony Voccia 2018년 10월 18일
댓글: Anthony Voccia 2018년 10월 18일
I am using a code my TA gave us to use for our lab report (had to edit some of his code to make it work so far) and he wants us to use the inv command and I have no experience with this. Any ideas on what to adjust to make it work?
  댓글 수: 5
madhan ravi
madhan ravi 2018년 10월 18일
Maybe P1 and P2 are vectors resulting in rectangular matrix.
Anthony Voccia
Anthony Voccia 2018년 10월 18일
P1 and P2 vectors are taken directly out of an excel document that have already had everything created. The TA we have doesn't always give us the best methods to use. I will use the code command next time

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

채택된 답변

James Tursa
James Tursa 2018년 10월 18일
편집: James Tursa 2018년 10월 18일
Normally the inv is applied to the left hand side coefficients, since people usually write the "A" matrix on the left and the "b" vector on the right in an Ax=b linear system. So I am guessing you need to change the inv( ) calculation to this:
V = inv(LHS)*RHS;
  댓글 수: 1
Anthony Voccia
Anthony Voccia 2018년 10월 18일
Reversing it did make it work, maybe the TA gave it to use backwards?

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

추가 답변 (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