📄 ch_02_24.mdl
字号:
Name "Odd_Even\nDecompose"
Ports [1, 1]
Position [155, 83, 205, 127]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "Odd and Even decompose for real sequence"
MaskDescription "Output a odd or even decompose signal .Input is"
" a real sequence."
MaskPromptString "Odd and Even Decompose"
MaskStyleString "popup(Odd Decompose|Even Decompose)"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "Ctrl=@1;"
MaskDisplay "plot(-3:0.5:3,[0 0 0 -1 -1 -1 0 1 1 1 0 0 0])"
"\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Odd Decompose"
System {
Name "Odd_Even\nDecompose"
Location [385, 313, 755, 508]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 95, 55, 109]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Constant
Name "Control Variable"
Position [120, 82, 205, 108]
BackgroundColor "cyan"
Value "Ctrl"
VectorParams1D on
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [1, 1]
Position [125, 128, 185, 162]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "Odd Decompose"
MaskDisplay "disp('Odd\\nDecompose')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Subsystem"
Location [429, 141, 739, 300]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Reference
Name "Constant1"
Ports [0, 1]
Position [155, 98, 180, 132]
SourceBlock "dspsrcs3/DSP\nConstant"
SourceType "DSP Constant"
Value "2"
InterpretAs1D off
SampleMode "Discrete"
Ts "1"
FramebasedOutput off
}
Block {
BlockType Reference
Name "Flip1"
Ports [1, 1]
Position [95, 101, 130, 129]
SourceBlock "dspindex/Flip"
SourceType "Flip"
dim "Rows"
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [205, 31, 230, 69]
Inputs "*/"
Multiplication "Element-wise(.*)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [125, 25, 155, 55]
ShowName off
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out1"
Position [255, 43, 285, 57]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [5, 0]
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, 75]
DstBlock "Flip1"
DstPort 1
}
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [0, -55]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Product1"
DstPort 1
}
Line {
SrcBlock "Flip1"
SrcPort 1
Points [5, 0]
DstBlock "Sum1"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Subsystem1"
Ports [1, 1]
Position [125, 29, 185, 61]
ShowPortLabels on
TreatAsAtomicUnit off
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
MaskType "Even Decompose"
MaskDisplay "disp('Even\\n Decompose')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Subsystem1"
Location [165, 172, 480, 403]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
Port "1"
LatchInput off
Interpolate on
}
Block {
BlockType Reference
Name "Constant"
Ports [0, 1]
Position [155, 98, 180, 132]
SourceBlock "dspsrcs3/DSP\nConstant"
SourceType "DSP Constant"
Value "2"
InterpretAs1D off
SampleMode "Discrete"
Ts "1"
FramebasedOutput off
}
Block {
BlockType Reference
Name "Flip"
Ports [1, 1]
Position [90, 101, 125, 129]
SourceBlock "dspindex/Flip"
SourceType "Flip"
dim "Rows"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [210, 31, 235, 69]
Inputs "*/"
Multiplication "Element-wise(.*)"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [120, 25, 150, 55]
ShowName off
IconShape "round"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Name "Out1"
Position [260, 43, 290, 57]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [10, 0]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Flip"
SrcPort 1
Points [5, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
DstBlock "Flip"
DstPort 1
}
}
}
}
Block {
BlockType Switch
Name "Switch"
Position [260, 22, 295, 168]
Threshold "2"
}
Block {
BlockType Outport
Name "Out1"
Position [315, 90, 345, 104]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Control Variable"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Subsystem1"
SrcPort 1
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "In1"
SrcPort 1
Points [20, 0]
Branch {
Points [0, -55]
DstBlock "Subsystem1"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "Subsystem"
DstPort 1
}
}
}
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [245, 90, 305, 120]
VariableName "x"
MaxDataPoints "inf"
Decimation "21"
SampleTime "-1"
SaveFormat "Array"
}
Line {
SrcBlock "Odd_Even\nDecompose"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
SrcBlock "Gate Impusle"
SrcPort 1
DstBlock "Odd_Even\nDecompose"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -