?? askwnymf.mdl
字號:
Name "Demux"
Ports [1, 2]
Position [260, 55, 300, 90]
Outputs "[len_rg, 1]"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [80, 56, 115, 89]
Inputs "2"
}
Block {
BlockType "S-Function"
Name "S-function"
Ports [1, 1]
Position [150, 65, 200, 85]
FunctionName "regshift"
Parameters "shft_out, thrhld"
}
Block {
BlockType Outport
Name "out_1"
Position [330, 55, 350, 75]
}
Block {
BlockType Outport
Name "out_2"
Position [330, 70, 350, 90]
Port "2"
}
Line {
SrcBlock "in_2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "out_2"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "S-function"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-function"
DstPort 1
}
}
}
Block {
BlockType Terminator
Name "Terminator"
Position [475, 195, 495, 215]
}
Block {
BlockType SubSystem
Name "clock"
Ports [0, 1]
Position [35, 147, 70, 183]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Pulse Generator"
MaskDescription "Pulse Generator."
MaskHelp "Pulse generator which ensures pulse\\ntrans"
"itions are hit. Provides a vector of pulses when the height is entered as a v"
"ector.\\nUnmask to see how it works."
MaskPromptString "Pulse period (secs):|Pulse width:|Pulse hei"
"ght:|Pulse start time:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskInitialization "Ts=@1; du=@2; ht=@3; stt=@4; ini=ones(lengt"
"h(ht),1); st1=rem(stt,Ts); st2=rem(stt+du,Ts);if(Ts<=1.2*du),ini=zeros(length"
"(ht),1);end;"
MaskDisplay "plot(0,0,100,100,[90,75,75,60,60,35,35,20,2"
"0,10],[20,20,80,80,20,20,80,80,20,20])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString ".5|.25|1|0"
System {
Name "clock"
Location [158, 441, 759, 682]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Clock
Name "Clock1"
Position [295, 100, 315, 120]
ShowName off
Decimation "10"
}
Block {
BlockType Constant
Name "Constant"
Position [25, 30, 45, 50]
}
Block {
BlockType Constant
Name "Constant1"
Position [295, 149, 320, 171]
Value "stt"
}
Block {
BlockType Gain
Name "Gain"
Position [510, 102, 535, 128]
ShowName off
Gain "ht"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [285, 38, 315, 62]
Operator "XOR"
}
Block {
BlockType Logic
Name "Logical\nOperator1"
Ports [1, 1]
Position [355, 38, 385, 62]
Operator "NOT"
Inputs "1"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [455, 105, 480, 125]
ShowName off
}
Block {
BlockType RelationalOperator
Name "Relational\noperator"
Position [370, 102, 400, 133]
ShowName off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [135, 35, 155, 55]
ShowName off
Inputs "+-"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [130, 120, 150, 140]
ShowName off
Inputs "+-"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [145, 75, 195, 95]
Orientation "left"
SampleTime "[Ts,st1]"
}
Block {
BlockType UnitDelay
Name "Unit Delay1"
Position [140, 165, 190, 185]
Orientation "left"
X0 "ini"
SampleTime "[Ts,st2]"
}
Block {
BlockType Outport
Name "out_1"
Position [560, 105, 580, 125]
ShowName off
}
Line {
SrcBlock "Logical\nOperator1"
SrcPort 1
Points [40, 0; 0, 60]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Logical\nOperator1"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [20, 0; 0, -35]
DstBlock "Relational\noperator"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Relational\noperator"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Clock1"
SrcPort 1
DstBlock "Relational\noperator"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-35, 0; 0, -35]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 0]
Branch {
Points [70, 0; 0, 40]
DstBlock "Unit Delay"
DstPort 1
}
Branch {
DstBlock "Logical\nOperator"
DstPort 1
}
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [20, 0; 0, 85]
DstBlock "Sum1"
DstPort 1
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [0, 0]
Branch {
Points [55, 0; 0, 45]
DstBlock "Unit Delay1"
DstPort 1
}
Branch {
Points [90, 0; 0, -75]
DstBlock "Logical\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Unit Delay1"
SrcPort 1
Points [-35, 0; 0, -40]
DstBlock "Sum1"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "delay"
Ports [1, 1]
Position [260, 48, 340, 92]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Multi-step delay"
MaskDescription "Output is K-step delay of the input signal."
MaskHelp "This block holds the input signal for K ste"
"ps and then outputs the signal. The delay step cannot be changed during the s"
"imulation."
MaskPromptString "Delay steps (integer):|Sample time (sec):|I"
"nitial output:"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskInitialization "n=@1;ts=@2;if length(ts)<2, ts=[ts 0];end;i"
"ni=@3;"
MaskDisplay "disp('-k\\nz ')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "2|.5|0"
System {
Name "delay"
Location [12, 432, 357, 702]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [20, 80, 40, 100]
}
Block {
BlockType Constant
Name "Constant"
Position [120, 230, 140, 250]
Value "ini"
}
Block {
BlockType Constant
Name "Constant1"
Position [15, 194, 100, 216]
Value "n*ts(1)+ts(2)"
}
Block {
BlockType DigitalClock
Name "Digital Clock"
Position [60, 140, 95, 170]
SampleTime "ts"
}
Block {
BlockType DiscreteFilter
Name "K-step\ndelay"
Position [60, 70, 185, 110]
Numerator "[zeros(1,n), 1]"
Denominator "1"
SampleTime "ts"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [150, 168, 180, 192]
}
Block {
BlockType Switch
Name "Switch"
Position [270, 114, 295, 146]
Threshold ".1"
}
Block {
BlockType Outport
Name "out_1"
Position [325, 120, 345, 140]
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "K-step\ndelay"
DstPort 1
}
Line {
SrcBlock "K-step\ndelay"
SrcPort 1
Points [5, 0; 0, 30]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [95, 0; 0, -100]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Digital Clock"
SrcPort 1
Points [15, 0; 0, 20]
DstBlock "Relational\nOperator"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [10, 0; 0, -20]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [35, 0; 0, -50]
DstBlock "Switch"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "hold"
Ports [3, 2]
Position [260, 138, 340, 182]
ShowPortLabels off
TreatAsAtomicUnit off
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -