📄 ch_02_ex12b.mdl
字号:
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [220, 117, 250, 148]
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [145, 190, 165, 210]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [145, 115, 165, 135]
ShowName off
IconShape "round"
Inputs "|-+"
}
Block {
BlockType Outport
Name "Out1"
Position [370, 138, 400, 152]
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [25, 0; 0, -60]
DstBlock "Logical\nOperator"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator1"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant3"
SrcPort 1
Points [75, 0; 0, 90]
Branch {
Points [0, 75]
DstBlock "Relational\nOperator"
DstPort 2
}
Branch {
DstBlock "Relational\nOperator1"
DstPort 2
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Relational\nOperator1"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant4"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant2"
SrcPort 1
Points [45, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "DSP\nConstant1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, -50]
DstBlock "Sum1"
DstPort 2
}
Branch {
DstBlock "Sum"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Gate Impusle1"
Ports [0, 1]
Position [195, 195, 240, 225]
TreatAsAtomicUnit off
MaskType "Generates x(n)=gate(n-n0)"
MaskDescription "Output a discrete gate impulse. Note:n1<=n<=n2."
MaskPromptString "Discrete time|Left Upstep(n1)|Right Downstep(n2"
")"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "n=@1;n1=@2;n2=@3;"
MaskDisplay "disp('Discrete\\n Gate')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "n|10|20"
System {
Name "Gate Impusle1"
Location [122, 151, 539, 498]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Reference
Name "DSP\nConstant1"
Ports [0, 1]
Position [70, 184, 105, 216]
BackgroundColor "cyan"
DropShadow on
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "n"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "1"
framePeriod "1"
additionalParams off
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "1"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "DSP\nConstant2"
Ports [0, 1]
Position [70, 254, 105, 286]
BackgroundColor "yellow"
DropShadow on
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "n2"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "1"
framePeriod "1"
additionalParams off
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "1"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "DSP\nConstant3"
Ports [0, 1]
Position [70, 34, 105, 66]
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "0"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "1"
framePeriod "1"
additionalParams off
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "1"
FramebasedOutput "off"
}
Block {
BlockType Reference
Name "DSP\nConstant4"
Ports [0, 1]
Position [70, 109, 105, 141]
BackgroundColor "yellow"
DropShadow on
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "n1"
SampleMode "Discrete"
discreteOutput "Sample-based"
continuousOutput "Sample-based"
sampTime "1"
framePeriod "1"
additionalParams off
dataType "Inherit from 'Constant value'"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
InterpretAs1D "off"
Ts "1"
FramebasedOutput "off"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [310, 127, 340, 158]
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [220, 192, 250, 223]
Operator "<="
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [220, 117, 250, 148]
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [145, 190, 165, 210]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [145, 115, 165, 135]
ShowName off
IconShape "round"
Inputs "|-+"
}
Block {
BlockType Outport
Name "Out1"
Position [370, 138, 400, 152]
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Sum1"
DstPort 2
}
}
Line {
SrcBlock "DSP\nConstant2"
SrcPort 1
Points [45, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "DSP\nConstant4"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Relational\nOperator1"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant3"
SrcPort 1
Points [75, 0; 0, 90]
Branch {
DstBlock "Relational\nOperator1"
DstPort 2
}
Branch {
Points [0, 75]
DstBlock "Relational\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Relational\nOperator1"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [25, 0; 0, -60]
DstBlock "Logical\nOperator"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [130, 130, 160, 160]
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [140, 30, 170, 65]
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [195, 135, 225, 170]
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [265, 145, 295, 180]
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [290, 35, 330, 65]
ShowName off
IconShape "round"
Inputs "|++"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [360, 35, 420, 65]
VariableName "x"
MaxDataPoints "inf"
Decimation "21"
SampleTime "-1"
SaveFormat "Array"
}
Line {
SrcBlock "Gate Impusle"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [30, 0]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
DstBlock "Product1"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [15, 0]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Gate Impusle1"
SrcPort 1
Points [5, 0]
DstBlock "Product2"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "Product2"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Product2"
SrcPort 1
Points [10, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -