ga_nn.mdl
来自「本人调试的大作业(源程序模型+论文)」· MDL 代码 · 共 2,536 行 · 第 1/5 页
MDL
2,536 行
}
Line {
SrcBlock "IW{2,1}(23,:)'"
SrcPort 1
DstBlock "dotprod23"
DstPort 1
}
Line {
SrcBlock "dotprod23"
SrcPort 1
DstBlock "Mux"
DstPort 23
}
Line {
SrcBlock "IW{2,1}(24,:)'"
SrcPort 1
DstBlock "dotprod24"
DstPort 1
}
Line {
SrcBlock "dotprod24"
SrcPort 1
DstBlock "Mux"
DstPort 24
}
Line {
SrcBlock "IW{2,1}(25,:)'"
SrcPort 1
DstBlock "dotprod25"
DstPort 1
}
Line {
SrcBlock "dotprod25"
SrcPort 1
DstBlock "Mux"
DstPort 25
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "lz{2,1}"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "b{2}"
Position [160, 80, 200, 100]
BackgroundColor "lightBlue"
Value "[-3.8679342912066739;-1.219055096486679"
"8;2.9060460490807434;0.79908891163322404;-1.2609209886372781;0.79974368898356"
"962;-0.6375360913764323;0.8615632287402778;-1.1256808461460326;0.179426298719"
"85144;-0.7348234358750515;0.84681986124025788;1.0114955688174929;-0.604805974"
"7409944;-7.7854729906406943;0.98565723845934572;1.3156598927079681;-0.3777114"
"2917023259;-1.0260918371029004;-0.57222965124601244;8.1348450444676246;0.6881"
"5999049784593;-1.271445492624568;0.97382118073506951;0.50855284851757221]"
MaskDisplay "disp('bias')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Sum
Name "netsum"
Ports [2, 1]
Position [240, 60, 260, 80]
BackgroundColor "lightBlue"
Inputs "2"
}
Block {
BlockType Reference
Name "tansig"
Ports [1, 1]
Position [300, 60, 320, 80]
BackgroundColor "lightBlue"
SourceBlock "neural/Transfer Functions/tansig"
SourceType ""
ShowPortLabels on
}
Block {
BlockType Outport
Name "a{2}"
Position [360, 60, 380, 80]
BackgroundColor "magenta"
IconDisplay "Port number"
InitialOutput "[0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;"
"0;0;0;0;0;0]"
}
Line {
SrcBlock "a{1} "
SrcPort 1
DstBlock "Delays 1"
DstPort 1
}
Line {
SrcBlock "Delays 1"
SrcPort 1
DstBlock "LW{2,1}"
DstPort 1
}
Line {
SrcBlock "LW{2,1}"
SrcPort 1
DstBlock "netsum"
DstPort 1
}
Line {
SrcBlock "b{2}"
SrcPort 1
DstBlock "netsum"
DstPort 2
}
Line {
SrcBlock "netsum"
SrcPort 1
DstBlock "tansig"
DstPort 1
}
Line {
SrcBlock "tansig"
SrcPort 1
DstBlock "a{2}"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Layer 3"
Ports [1, 1]
Position [190, 120, 250, 140]
BackgroundColor "lightBlue"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Layer 3"
Location [480, 93, 1060, 386]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "a{2} "
Position [40, 40, 60, 60]
BackgroundColor "magenta"
IconDisplay "Port number"
PortDimensions "25"
}
Block {
BlockType SubSystem
Name "Delays 1"
Ports [1, 1]
Position [100, 40, 120, 60]
BackgroundColor "lightBlue"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskDisplay "disp('TDL')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Delays 1"
Location [480, 93, 1060, 386]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "p{3}"
Position [60, 40, 80, 60]
Orientation "down"
BackgroundColor "magenta"
NamePlacement "alternate"
IconDisplay "Port number"
PortDimensions "25"
}
Block {
BlockType Mux
Name "mux"
Ports [1, 1]
Position [200, 60, 240, 80]
BackgroundColor "lightBlue"
Inputs "1"
}
Block {
BlockType Outport
Name "pd{3,2}"
Position [300, 60, 320, 80]
BackgroundColor "magenta"
IconDisplay "Port number"
}
Line {
SrcBlock "p{3}"
SrcPort 1
DstBlock "mux"
DstPort 1
}
Line {
SrcBlock "mux"
SrcPort 1
DstBlock "pd{3,2}"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "LW{3,2}"
Ports [1, 1]
Position [160, 40, 200, 60]
BackgroundColor "lightBlue"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
MaskDisplay "disp('weight')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "LW{3,2}"
Location [480, 93, 1060, 386]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "ad{3,2}"
Position [40, 60, 60, 80]
BackgroundColor "magenta"
IconDisplay "Port number"
PortDimensions "25"
}
Block {
BlockType Constant
Name "IW{3,2}(1,:)'"
Position [140, 40, 180, 60]
BackgroundColor "lightBlue"
Value "[-18.798263005438447;1.649530136894"
"7903;-12.756816218384611;-1.2339687311759668;1.3799170057112131;-1.2662702515"
"567152;0.88702560146061182;-1.8263186894733563;1.1616008997090153;-0.27131694"
"985979432;1.8745039758287485;-1.4631367734121905;7.644706208378409;0.89027522"
"850719099;-6.9200732119218857;-1.1785547513732277;-0.13641168781102508;0.8328"
"8060680798726;0.87750775855764795;1.5397678114394406;-2.5525357402762379;-0.4"
"7414804916254366;1.9707584853702371;-0.5276288752353353;-0.80614031269414654]"
MaskDisplay "disp('weights')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Mux
Name "Mux"
Ports [1, 1]
Position [340, 60, 380, 80]
Inputs "1"
}
Block {
BlockType Reference
Name "dotprod1"
Ports [2, 1]
Position [240, 40, 260, 80]
BackgroundColor "lightBlue"
SourceBlock "neural/Weight Functions/dotprod"
SourceType ""
ShowPortLabels on
}
Block {
BlockType Outport
Name "lz{3,2}"
Position [420, 60, 440, 80]
BackgroundColor "magenta"
IconDisplay "Port number"
}
Line {
SrcBlock "IW{3,2}(1,:)'"
SrcPort 1
DstBlock "dotprod1"
DstPort 1
}
Line {
SrcBlock "ad{3,2}"
SrcPort 1
DstBlock "dotprod1"
DstPort 2
}
Line {
SrcBlock "dotprod1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "lz{3,2}"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "b{3}"
Position [160, 80, 200, 100]
BackgroundColor "lightBlue"
Value "-1.3103454474576288"
MaskDisplay "disp('bias')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Sum
Name "netsum"
Ports [2, 1]
Position [240, 60, 260, 80]
BackgroundColor "lightBlue"
Inputs "2"
}
Block {
BlockType Reference
Name "purelin"
Ports [1, 1]
Position [300, 60, 320, 80]
BackgroundColor "lightBlue"
SourceBlock "neural/Transfer Functions/purelin"
SourceType ""
ShowPortLabels on
}
Block {
BlockType Outport
Name "a{3}"
Position [360, 60, 380, 80]
BackgroundColor "magenta"
IconDisplay "Port number"
InitialOutput "0"
}
Line {
SrcBlock "a{2} "
SrcPort 1
DstBlock "Delays 1"
DstPort 1
}
Line {
SrcBlock "Delays 1"
SrcPort 1
DstBlock "LW{3,2}"
DstPort 1
}
Line {
SrcBlock "LW{3,2}"
SrcPort 1
DstBlock "netsum"
DstPort 1
}
Line {
SrcBlock "b{3}"
SrcPort 1
DstBlock "netsum"
DstPort 2
}
Line {
SrcBlock "netsum"
SrcPort 1
DstBlock "purelin"
DstPort 1
}
Line {
SrcBlock "purelin"
SrcPort 1
DstBlock "a{3}"
DstPort 1
}
}
}
Block {
BlockType Goto
Name "a{1}"
Position [380, 40, 400, 60]
GotoTag "feedback1"
TagVisibility "local"
MaskDisplay "plot(cos(0:.1:2*pi),sin(0:.1:2*pi))"
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Goto
Name "a{2}"
Position [380, 80, 400, 100]
GotoTag "feedback2"
TagVisibility "local"
MaskDisplay "plot(cos(0:.1:2*pi),sin(0:.1:2*pi))"
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Outport
Name "y{1}"
Position [380, 160, 400, 180]
BackgroundColor "magenta"
IconDisplay "Port number"
InitialOutput "0"
}
Line {
SrcBlock "p{1}"
SrcPort 1
DstBlock "Layer 1"
DstPort 1
}
Line {
SrcBlock "Layer 1"
SrcPort 1
DstBlock "a{1}"
DstPort 1
}
Line {
SrcBlock " a{1} "
SrcPort 1
DstBlock "Layer 2"
DstPort 1
}
Line {
SrcBlock "Layer 2"
SrcPort 1
DstBlock "a{2}"
DstPort 1
}
Line {
SrcBlock " a{2} "
SrcPort 1
DstBlock "Layer 3"
DstPort 1
}
Line {
SrcBlock "Layer 3"
SrcPort 1
DstBlock "y{1}"
DstPort 1
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [470, 99, 500, 131]
Floating off
Location [839, 161, 1387, 592]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0"
YMax "1.4"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [15, 120, 45, 150]
Time "0"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [80, 125, 100
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?