SIMULINK matlab function模块出问题 。
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
lixativ
el 30 de Nov. de 2022
Respondida: norijal
el 30 de Nov. de 2022
设计了一个求常微分方程的模块,我把slx文件和相关的m文件发上来,请各位老师帮我看看。

matlab function里的代码:
function [y1,y2] = ODE_solver(u1,u2,u3)
tspan=[0 10];
[t,ysol]=ode45('Gsolve_aug',tspan,[0.001 0],[],u1,u2,u3)
y1=ysol(1,:);
y2=ysol(2,:);
下面是调用的m文件和模型slx文件。
0 comentarios
Respuesta aceptada
norijal
el 30 de Nov. de 2022
思路完全不对,simulink本来就是解ode的,你还弄个m文件去解ode,那为何还要sim呢?
另外,你这样的代码,y1是一个时变向量,放进scope,基本啥都看不出来的
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!