📄 ch2example18b.mdl
字号:
Model {
Name "ch2example18B"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions on
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Wed Jun 27 18:45:55 2007"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "shaoyubin"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Wed Jun 27 20:19:46 2007"
ModelVersionFormat "1.%<AutoIncrement:4>"
ConfigurationManager "None"
SimParamPage "Solver"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
BufferReuse on
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "FixedStepDiscrete"
SolverMode "Auto"
StartTime "0.0"
StopTime "100"
MaxOrder 5
MaxStep "0.01"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep "0.01"
RelTol "1e-3"
AbsTol "auto"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints on
MaxDataPoints "1000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt on
BooleanDataType on
ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType ZeroOrderHold
SampleTime "1"
}
}
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 "ch2example18B"
Location [348, 131, 928, 333]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "Buffer"
Ports [1, 1]
Position [210, 15, 260, 65]
FontName "Arial"
FontSize 12
SourceBlock "dspbuff3/Buffer"
SourceType "Buffer"
N "100"
V "0"
ic "0"
}
Block {
BlockType Reference
Name "Reshape"
Ports [1, 1]
Position [350, 28, 380, 52]
FontName "Arial"
FontSize 12
SourceBlock "simulink/Math\nOperations/Reshape"
SourceType "Reshape"
OutputDimensionality "1-D array"
OutputDimensions "[1,1]"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1]
Position [430, 22, 560, 58]
FontName "Arial"
FontSize 12
FunctionName "ch2example18SfunB"
Parameters "0.01"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [0, 1]
Position [15, 13, 90, 67]
FontName "Arial"
FontSize 12
TreatAsAtomicUnit off
MaskType "S-函数编写的正弦波发生器"
MaskDescription "产生指定频率、幅度和初相位的正弦波"
MaskHelp "产生指定频率、幅度和初相位的正弦波。"
MaskPromptString "频率|振幅|初相位"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "Freq=@1;Amp=@2;Phase=@3;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "3.01|3|0"
System {
Name "Subsystem"
Location [78, 105, 303, 205]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType "S-Function"
Name "S-Function"
Ports [0, 1]
Position [15, 26, 135, 74]
FunctionName "ch2example17Sfun"
Parameters "Amp,Freq,Phase"
}
Block {
BlockType Outport
Name "Out1"
Position [170, 43, 200, 57]
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [130, 21, 165, 59]
FontName "Arial"
FontSize 12
SampleTime "1/100"
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Buffer"
SrcPort 1
DstBlock "Reshape"
DstPort 1
}
Line {
SrcBlock "Reshape"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Buffer"
DstPort 1
}
Annotation {
Name "3.01Hz, \n3V 正弦波"
Position [51, 98]
FontName "Arial"
FontSize 12
}
Annotation {
Name "将其转换为\n离散时间信号,\n采样时间为0.01秒"
Position [141, 114]
FontName "Arial"
FontSize 12
}
Annotation {
Name "设置缓存大小为100"
Position [236, 92]
FontName "Arial"
FontSize 12
}
Annotation {
Name "将Frame格式转换为\n1维的,以适应S-函数调用"
Position [366, 87]
FontName "Arial"
FontSize 12
}
Annotation {
Name "参数:采样时间0.01"
Position [494, 82]
FontName "Arial"
FontSize 12
}
Annotation {
Name "利用缓存模块构建的S-函数示波器测试模型。文件名"
":ch2example18B.mdl"
Position [294, 152]
DropShadow on
FontName "Arial"
FontSize 12
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -