필터 지우기
필터 지우기

Matrix dimensions must agree.

조회 수: 1 (최근 30일)
KAPIL MAMTANI
KAPIL MAMTANI 2016년 4월 15일
편집: Stephen23 2016년 4월 15일
hi, I am getting this error in my code. can anybody help me with this. Thank you in advance.
  댓글 수: 1
KAPIL MAMTANI
KAPIL MAMTANI 2016년 4월 15일
error on solving for Y

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

채택된 답변

Stephen23
Stephen23 2016년 4월 15일
편집: Stephen23 2016년 4월 15일
On that line instead of the right-matrix division operator (which does matrix division):
/
you need to use the right array division operator (which works element-wise):
./
And read this to know the difference:
because you will fix that line and get exactly the same error on the following lines. When you understand the difference between matrix and array operations then you can solve this yourself.
  댓글 수: 3
KAPIL MAMTANI
KAPIL MAMTANI 2016년 4월 15일
Mister can you tell me if i am solving correctly for Y , Nu and Pu in the code, as they are dependent on the ODEs.
Stephen23
Stephen23 2016년 4월 15일
편집: Stephen23 2016년 4월 15일
The Runge-Kutta method looks okay, except that you are missing the for operator. You should use [your favorite internet search engine] to find examples of Runge-Kutta implementation using MATLAB (there are lots of them). Then you can compare your work, and decide if it is okay.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by