What is wrong with this line of script?
조회 수: 1 (최근 30일)
이전 댓글 표시
I've written: [t,h] = ode45('cylinder_tank_drain', [0, 200], h0)
it keeps coming up with an error message what just says there is an error in this line. what is wrong? :(
댓글 수: 0
채택된 답변
추가 답변 (3개)
Walter Roberson
2014년 4월 5일
There is no obvious error in that line. Perhaps there is an error in the previous line that is affecting it. Please post more of your script.
Also, I suggest converting to function handle form:
[t, h] = ode45(@cylinder_tank_drain, [0, 200], h0);
댓글 수: 0
Youssef Khmou
2014년 4월 5일
The problem resides in the function "cylinder_tank_drain", if it is possible you post the function to study its input and outputs.
댓글 수: 0
Alice
2014년 4월 5일
편집: Walter Roberson
2014년 4월 5일
댓글 수: 2
Walter Roberson
2014년 4월 5일
Your "r" is length 11. Your "r0" is length 10. You are trying to combine two vectors of different lengths.
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!