📄 ex10_4.mdl
字号:
Model { Name "ex9_4" Version 2.09 SimParamPage Solver SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off PaperOrientation landscape PaperType usletter PaperUnits inches StartTime "0.0" StopTime "1000.0" Solver ode23s RelTol "1e-3" AbsTol "1e-6" Refine "1" MaxStep ".1" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption RefineOutputTimes OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg warning MinStepSizeMsg warning UnconnectedInputMsg warning UnconnectedOutputMsg warning UnconnectedLineMsg warning ConsistencyChecking off ZeroCross on SimulationMode normal RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWRetainRTWFile off RTWTemplateMakefile "grt_vc.tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off ExtModeMexFile "ext_comm" ExtModeBatchMode off BlockDefaults { Orientation right ForegroundColor black BackgroundColor white DropShadow off NamePlacement normal FontName "Helvetica" FontSize 10 FontWeight normal FontAngle normal ShowName on } AnnotationDefaults { HorizontalAlignment center VerticalAlignment middle ForegroundColor black BackgroundColor white DropShadow off FontName "Helvetica" FontSize 10 FontWeight normal FontAngle normal } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight normal FontAngle normal } System { Name "ex9_4" Location [250, 252, 600, 504] Open on ScreenColor white Block { BlockType Integrator Name "Compute\nx" Ports [1, 1, 0, 0, 0] Position [195, 73, 220, 117] ExternalReset none InitialConditionSource internal InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Compute\nx_dot" Ports [1, 1, 0, 0, 0] Position [115, 73, 140, 117] ExternalReset none InitialConditionSource internal InitialCondition "1" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Sum Name "Compute\nx_dot_dot" Ports [2, 1, 0, 0, 0] Position [55, 77, 85, 108] Inputs "--" } Block { BlockType Scope Name "Scope" Ports [1, 0, 0, 0, 0] Position [285, 80, 315, 110] Floating off Location [649, 30, 973, 269] Open on Grid on TickLabels on ZoomMode on TimeRange "auto" YMin "-1.25 " YMax "2.25 " SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType SubSystem Name "SetParams" Ports [0, 0, 0, 0, 0] Position [30, 195, 141, 225] DeleteFcn "sys_set close_fig" ModelCloseFcn "sys_set close_fig" NameChangeFcn "sys_set rename_block" OpenFcn "sys_set create_fig" ShowPortLabels on MaskDescription "This masked subsystem supports the spring-mass " "user interface. The\ndialog fiellds are not " "available to the user due to the use of the " "\nOperFcn callback." MaskPromptString "Mass|Damping coefficient|Spring constant" MaskStyleString "edit,edit,edit" MaskVariables "m=@1;c=@2;k=@3;" MaskDisplay "disp('Double click\\nto set parameters')" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "1.000000|0.010000|0.090000" System { Name "SetParams" Location [314, 471, 505, 568] Open off ScreenColor white Annotation { Position [97, 50] Text "This is an empty subsystem. \nThe purpose " "of the subsystem \nis to provide a means " "to open \nthe sys_set user interface. " } } } Block { BlockType SubSystem Name "StartStop" Ports [0, 0, 0, 0, 0] Position [210, 188, 325, 225] DeleteFcn "strtstpm close_fig" ModelCloseFcn "strtstpm close_fig" StartFcn "strtstpm start_sim" StopFcn "strtstpm stop_sim" NameChangeFcn "strtstpm rename_block" OpenFcn "strtstpm create_fig" ShowPortLabels on MaskDisplay "disp('Double click\\nto open\\nStart/Stop " "Control')" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale System { Name "StartStop" Location [314, 471, 505, 568] Open off ScreenColor white Annotation { Position [97, 50] Text "This is an empty subsystem. \nThe purpose " "of the subsystem \nis to provide a means " "to open \nthe sys_set user interface. " } } } Block { BlockType Gain Name "c/m" Position [110, 15, 140, 45] Orientation left Gain "0.010000" } Block { BlockType Gain Name "k/m" Position [150, 145, 180, 175] Orientation left Gain "0.090000" } Line { SrcBlock "Compute\nx_dot_dot" SrcPort 1 DstBlock "Compute\nx_dot" DstPort 1 } Line { SrcBlock "c/m" SrcPort 1 Points [-80, 0; 0, 55] DstBlock "Compute\nx_dot_dot" DstPort 1 } Line { SrcBlock "Compute\nx_dot" SrcPort 1 Points [20, 0] Branch { DstBlock "Compute\nx" DstPort 1 } Branch { Points [0, -65] DstBlock "c/m" DstPort 1 } } Line { SrcBlock "k/m" SrcPort 1 Points [-120, 0; 0, -60] DstBlock "Compute\nx_dot_dot" DstPort 2 } Line { SrcBlock "Compute\nx" SrcPort 1 Points [25, 0] Branch { Labels [1, 0] Points [0, 65] DstBlock "k/m" DstPort 1 } Branch { DstBlock "Scope" DstPort 1 } } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -