eulers method and relative error
조회 수: 9 (최근 30일)
이전 댓글 표시
hi im new to matlab and have this question ,
Use Euler’s method to evaluate the solution to the system of differential equations over the first 20 hours. Use a step size of h = 15 minutes and examine the relative error between the numerical and analytical calculations.
these are the equations
1) R + k*x2(t) - k*x1(t)
2) k*x1(t) - (alpha + k) * x2(t)
values of aplha = 10
k = 50
and R = 100
can anyone help ?
댓글 수: 3
Jim Riggs
2020년 12월 11일
편집: Jim Riggs
2020년 12월 11일
Well, I don't use the symbolic processing toolbox, so I don't have any advice regarding that.
But the reference to X1(0) and X2(0) may be the problem. If the numbers in the parenteses are subscripts, they must be positive, that would be what the error is indicating. A value of zero is not positive. Needs to be 1 or greater (integer or logical type)
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!