📄 ch_02_ex12a.mdl
字号:
BlockType Reference
Name "DSP\nConstant2"
Ports [0, 1]
Position [70, 114, 105, 146]
BackgroundColor "cyan"
DropShadow on
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "n0"
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, 179, 105, 211]
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 RelationalOperator
Name "Relational\nOperator"
Position [200, 52, 230, 83]
Operator "=="
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [130, 50, 150, 70]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Outport
Name "Out1"
Position [275, 63, 305, 77]
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant2"
SrcPort 1
Points [30, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "DSP\nConstant1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant3"
SrcPort 1
Points [65, 0; 0, -120]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Delta Impulse1"
Ports [0, 1]
Position [95, 135, 150, 175]
TreatAsAtomicUnit off
MaskType "Generates x(n)=delta(n-n0)"
MaskDescription "Output a discrete delta impulse.n1<=n<=n2."
MaskPromptString "Discrete time|Delay(samples)"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "n=@1;n0=@2;"
MaskDisplay "disp('Discrete\\n Impulse')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "n|4"
System {
Name "Delta Impulse1"
Location [416, 89, 768, 391]
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, 44, 105, 76]
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, 114, 105, 146]
BackgroundColor "cyan"
DropShadow on
SourceBlock "dspsrcs4/DSP\nConstant"
SourceType "DSP Constant"
Value "n0"
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, 179, 105, 211]
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 RelationalOperator
Name "Relational\nOperator"
Position [200, 52, 230, 83]
Operator "=="
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [130, 50, 150, 70]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Outport
Name "Out1"
Position [275, 63, 305, 77]
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant3"
SrcPort 1
Points [65, 0; 0, -120]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "DSP\nConstant1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "DSP\nConstant2"
SrcPort 1
Points [30, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType Gain
Name "Gain"
Position [140, 65, 170, 95]
Gain "2"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [200, 65, 230, 95]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [265, 65, 325, 95]
VariableName "x"
MaxDataPoints "inf"
Decimation "11"
SampleTime "-1"
SaveFormat "Array"
}
Line {
SrcBlock "Delta Impulse"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Delta Impulse1"
SrcPort 1
Points [60, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -