📄 ch8example2.mdl
字号:
Output "Magnitude and angle"
}
Block {
BlockType Fcn
Name "Fcn"
Position [45, 30, 105, 60]
Expr "5^15*u+1-floor((5^15*u+1)/2^35)*2^35"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [305, 45, 365, 75]
Expr "sqrt(-2*log(u))"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [305, 105, 365, 135]
Expr "cos(2*pi*u)"
}
Block {
BlockType Fcn
Name "Fcn3"
Position [305, 160, 365, 190]
Expr "sin(2*pi*u)"
}
Block {
BlockType Gain
Name "Gain1"
Position [140, 40, 200, 80]
Gain "1/2^35"
}
Block {
BlockType Gain
Name "Gain2"
Position [720, 63, 760, 97]
Gain "100"
}
Block {
BlockType Reference
Name "Histogram"
Ports [2, 1]
Position [645, 62, 705, 98]
SourceBlock "dspstat3/Histogram"
SourceType "Histogram"
umin "-5"
umax "5"
nbins "1000"
normalized on
run on
reset on
trigtype "Rising edge"
}
Block {
BlockType Reference
Name "Integer Delay"
Ports [1, 1]
Position [215, 123, 255, 157]
FontSize 10
SourceBlock "dspsigops/Integer Delay"
SourceType "Integer Delay"
delay "5"
ic "0"
reset_popup "None"
}
Block {
BlockType Memory
Name "Memory"
Position [55, 80, 85, 110]
Orientation "left"
X0 "123"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [550, 51, 555, 89]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [410, 51, 455, 84]
InputSameDT off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [400, 151, 445, 184]
InputSameDT off
}
Block {
BlockType RealImagToComplex
Name "Real-Imag to\nComplex"
Ports [2, 1]
Position [480, 148, 510, 177]
ShowName off
Input "Real and imag"
}
Block {
BlockType Step
Name "Step"
Position [590, 120, 620, 150]
Time "100"
SampleTime "10"
}
Block {
BlockType Reference
Name "Vector\nScope"
Ports [1]
Position [780, 55, 815, 105]
SourceBlock "dspsnks4/Vector\nScope"
SourceType "Vector Scope"
ScopeProperties off
Domain "User-defined"
HorizSpan "1"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "get(0,'defaultfigureposition')"
AxisProperties on
XUnits "Hertz"
XRange "[0...Fs/2]"
InheritXIncr on
XIncr "1"
XLabel "range:(-5,5)"
YUnits "dB"
YMin "-0.1"
YMax "0.7"
YLabel "pdf"
LineProperties off
LineStyles "|-"
LineMarkers "|None"
LineColors "[1 0 0]|[0 0 1]"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [220, 41, 255, 79]
SampleTime "0.001"
}
Line {
SrcBlock "Fcn"
SrcPort 1
Points [15, 0; 0, 15]
Branch {
Points [0, 35]
DstBlock "Memory"
DstPort 1
}
Branch {
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Memory"
SrcPort 1
Points [-40, 0; 0, -50]
DstBlock "Fcn"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
Points [5, 0]
Branch {
Points [0, 50; -65, 0]
DstBlock "Integer Delay"
DstPort 1
}
Branch {
DstBlock "Fcn1"
DstPort 1
}
}
Line {
SrcBlock "Integer Delay"
SrcPort 1
Points [10, 0]
Branch {
Points [0, -20]
DstBlock "Fcn2"
DstPort 1
}
Branch {
Points [0, 35]
DstBlock "Fcn3"
DstPort 1
}
}
Line {
SrcBlock "Fcn1"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Product"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Product1"
DstPort 1
}
}
Line {
SrcBlock "Fcn3"
SrcPort 1
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Fcn2"
SrcPort 1
Points [25, 0]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Histogram"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Buffer"
SrcPort 1
DstBlock "Histogram"
DstPort 1
}
Line {
SrcBlock "Step"
SrcPort 1
Points [5, 0]
DstBlock "Histogram"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Buffer"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, -10]
DstBlock "Mux"
DstPort 1
}
Branch {
DstBlock "Real-Imag to\nComplex"
DstPort 1
}
}
Line {
SrcBlock "Product1"
SrcPort 1
DstBlock "Real-Imag to\nComplex"
DstPort 2
}
Line {
SrcBlock "Real-Imag to\nComplex"
SrcPort 1
DstBlock "Complex to\nMagnitude-Angle"
DstPort 1
}
Line {
SrcBlock "Complex to\nMagnitude-Angle"
SrcPort 1
Points [0, -20; -70, 0; 0, -65]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Complex to\nMagnitude-Angle"
SrcPort 2
Points [10, 0; 0, -45; -65, 0; 0, -45]
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Vector\nScope"
DstPort 1
}
Annotation {
Name "5^15*u+1-floor((5^15*u+1)/2^35)*2^35"
Position [104, 20]
}
Annotation {
Name "随机数的产生、变换和分布的直方图验证\n文件名:c"
"h8example2.mdl"
Position [119, 193]
DropShadow on
FontName "Arial"
FontSize 12
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -