24小时热门版块排行榜    

查看: 3736  |  回复: 1

wyjjf

新虫 (正式写手)

[交流] MATLAB:表格数据怎么带入到数学公式中

MATLAB:表格数据怎么带入到数学公式中

MATLAB:表格数据怎么带入到数学公式中
2222.jpg


MATLAB:表格数据怎么带入到数学公式中-1
22221.jpg

Matlab:edit,
Then,the following lines between the percent sign (%) copied to m.file, save
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function dx=myfun(t,x)
dx(1)=-6*x(2)*x(2)-9;
dx(2)=-3*x(1)*x(2)-2*x(3);
dx(3)=x(1)*x(2)+x(3)+8;
dx=dx(;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Matlab:
x0=[3,-4,2];
t0=0:0.1:2;
[t,x]=ode45('myfun',[0,2],x0);   
plot(t,x)
legend('u','v','Y')
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

wyjjf

新虫 (正式写手)

The formulas above without Yvv and Yuu Matlab:edit, Then,the following lines between the percent sign (%) copied to m.file, save %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function dx=myfun(t,x) dx(1)=-6*x(2)*x(2)-9; dx(2)=-3*x(1)*x(2)-2*x(3); dx(3)=x(1)*x(2)+x(3)+8; dx=dx(; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Matlab: x0=[3,-4,2]; t0=0:0.1:2; [t,x]=ode45('myfun',[0,2],x0); plot(t,x) legend('u','v','Y')
2楼2015-02-10 19:27:13
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 wyjjf 的主题更新
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见