You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

实现点击坐标轴绘制以点击点为初值的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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 03:57:08