MATLAB中simout怎么用,以编程方式运行仿真

MATLAB中simout怎么⽤,以编程⽅式运⾏仿真此⽰例对采⽤名称-值对组形式指定参数值的模型进⾏仿真。运⾏仿真。
simOut = sim('vdp','SimulationMode','normal','AbsTol','1e-5',...
'SaveState','on','StateSaveName','xoutNew',...
'SaveOutput','on','OutputSaveName','youtNew',...
'SaveFormat', 'StructureWithTime');
访问 ModelInfo 属性,其中包含有关模型和求解器的基本信息
maxstepans =
struct with fields:
ModelName: 'vdp'
ModelVersion: '1.6'
ModelFilePath: 'C:\MyWork'
UserID: 'User'
MachineName: 'MyMachine'
Platform: 'PCWIN64'
ModelStructuralChecksum: [4×1 uint32]
SimulationMode: 'normal'
StartTime: 0
StopTime: 20
SolverInfo: [1×1 struct]
SimulinkVersion: [1×1 struct]
LoggingInfo: [1×1 struct]
检查求解器信息。
ans =
struct with fields:
Type: 'Variable-Step'
Solver: 'ode45'
MaxStepSize: 0.4000
查看仿真的时间信息,例如仿真的开始时间和完成时间,以及仿真初始化、执⾏和终⽌所⽤的时间。
ans =
struct with fields:
WallClockTimestampStart: '2016-06-17 10:26:58.433686' WallClockTimestampStop: '2016-06-17 10:26:58.620687' InitializationElapsedWallTime: 0.1830 ExecutionElapsedWallTime: 1.0000e-03 TerminationElapsedWallTime: 0.0030
TotalElapsedWallTime: 0.1870
为仿真添加说明。
simOut=simOut.setUserString('Results from simulation 1 of 10'); SimulationMetadata
ans =
SimulationMetadata with properties:
ModelInfo: [1×1 struct]
TimingInfo: [1×1 struct]
ExecutionInfo: [1×1 struct]
UserString: 'Results from simulation 1 of 10'
UserData: []
您还可以使⽤ UserData 属性添加您⾃⼰的⾃定义数据。

本文发布于:2024-09-23 23:22:48,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/4/350510.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:时间   求解   信息   模型   属性   有关
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议