필터 지우기
필터 지우기

Matlab warning response when I use ode23s to solve a differential equation

조회 수: 1 (최근 30일)
Zhongfu Wang
Zhongfu Wang 2018년 6월 21일
댓글: Zhongfu Wang 2018년 6월 21일
Warning: Failure at t=8.220327e-08. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (2.920447e-22) at time t.
My code can run the result of angle 45, but fails at the angle of 50. I can't figure out the reason.
  댓글 수: 2
Jan
Jan 2018년 6월 21일
Some hints:
  • Omit the darn clear all, which causes more troubles than it solves.
  • Provide the function to be integrated as function handle, not as string. The string method is still working to keep the backward compatibility, but it is outdated for 20 years now.
  • 1./x is much more efficient that x.^-1
We cannot guess, which "angle" you set where from 45 to 50. Without any useful comments the code is a graveyard for numbers and trigonometric functions only. Use trailing semicolons to suppress the time-consuming output to the command window.
The error message occurs, if there is a pole at the initial position.

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

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by