A\b doesn't work

조회 수: 15 (최근 30일)
Dawid
Dawid 2013년 12월 7일
댓글: Image Analyst 2014년 3월 25일
I have a problem in working with the matrix.
This is my script:
A=[0 0 0 0 0 0; 2.05^4 2.05^3 2.05^2 0 0 0; 3.1^4 3.1^3 3.1^2 0 0 0; 4.8^4 4.8^3 4.8^2 0 0 0; 5.6^4 5.6^3 5.6^2 0 0 0; 6.8 ^4 6.8^3 6.8^2 0 0 0]
b=[0 2.47 6.1 18.3 27.4 36.6]
x=A\b
This is the error messsage I get from Matlab:
??? Error using ==> mldivide Matrix dimensions must agree.
Error in ==> nad at 3 x=A\b
How I can solve this problem?
Thanks You very much.
  댓글 수: 1
Image Analyst
Image Analyst 2014년 3월 25일
Original question in case he deletes it like he's done with others.
I have a problem in working with the matrix.
This is my script:
A=[0 0 0 0 0 0; 2.05^4 2.05^3 2.05^2 0 0 0; 3.1^4 3.1^3 3.1^2 0 0 0; 4.8^4 4.8^3 4.8^2 0 0 0; 5.6^4 5.6^3 5.6^2 0 0 0; 6.8 ^4 6.8^3 6.8^2 0 0 0]
b=[0 2.47 6.1 18.3 27.4 36.6]
x=A\b
This is the error messsage I get from Matlab:
??? Error using ==> mldivide Matrix dimensions must agree.
Error in ==> nad at 3 x=A\b
How I can solve this problem?
Thanks You very much.

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

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 12월 7일
편집: Azzi Abdelmalek 2013년 12월 7일
b is a column vector
b=b'
x=A\b

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by