实现点击坐标轴绘制以点击点为初值的ODE解的技术问询
实现点击坐标轴绘制ODE解的MATLAB代码尝试
我正在尝试编写一段MATLAB代码,目标是实现点击坐标轴区域后,以点击位置作为初始条件,绘制对应常微分方程(ODE)的解曲线。目前我写出了部分代码,如下:
function myui clc close all xmin=2; xmax=10; ymin=-4; ymax=4; f=@(t,y) y^2-t fig=figure; ax=axes('Units','pixels',... 'XLim',[xmin,xmax],... 'YLim',[ymin,ymax],... 'ButtonDownFcn',@plotode) function plotode(source,event) initcond=get(ax,'CurrentPoint'); initcond=initcond(1,1:2) [t,y]=ode45(f,[initcond(...
内容的提问来源于stack exchange,提问作者David
相关产品推荐
相关产品推荐

