此示例对采用名称-值对组形式指定参数值的模型进行仿真。运行仿真。
simOut = sim('vdp','SimulationMode','normal','AbsTol','1e-5',...
'SaveState','on','StateSaveName','xoutNew',...
'SaveOutput','on','OutputSaveName','youtNew',...
'SaveFormat', 'StructureWithTime');
访问 ModelInfo 属性,其中包含有关模型和求解器的基本信息。
simOut.getSimulationMetadata.ModelInfo
ans =
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 stru