Please help me with code for the below ode
    5 次查看(过去 30 天)
  
       显示 更早的评论
    
6 个评论
  Walter Roberson
      
      
 2019-8-27
				You have
function f = forced_coulomb_base(t,x,y)
so forced_coulomb_base expects to be passed three variables.
You have
[t,x,y]=ode45(@forced_coulomb_base,tspan,x0,y0);
ode45 passes two parameters to the function: the independent variable in the first parameter, and the boundary conditions in the second parameter.
You cannot calculate two separate ode by passing them as additional parameters and expecting additional outputs: all boundary conditions must be passed in a single variable, and all calculations must be returned in a single variable.
回答(0 个)
另请参阅
类别
				在 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!







