📄 pca.mdl
字号:
Block {
BlockType From
Name "From1"
Position [315, 87, 370, 103]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "n"
}
Block {
BlockType Goto
Name "Goto"
Position [215, 132, 275, 148]
ShowName off
GotoTag "m"
TagVisibility "local"
}
Block {
BlockType Goto
Name "Goto1"
Position [215, 152, 275, 168]
ShowName off
GotoTag "n"
TagVisibility "local"
}
Block {
BlockType Math
Name "Math\nFunction1"
Ports [1, 1]
Position [450, 125, 480, 155]
ShowName off
Operator "sqrt"
}
Block {
BlockType Reference
Name "Mean"
Ports [1, 1]
Position [225, 50, 280, 90]
SourceBlock "dspstat3/Mean"
SourceType "Mean"
run off
reset_popup "None"
Port {
PortNumber 1
Name "mean_A"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Probe
Name "Probe"
Ports [1, 1]
Position [100, 136, 145, 164]
ProbeWidth off
ProbeSampleTime off
ProbeComplexSignal off
ProbeSignalDimensions on
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [540, 61, 585, 94]
ShowName off
Inputs "*/"
InputSameDT off
}
Block {
BlockType Reference
Name "Singular Value\nDecomposition"
Ports [1, 3]
Position [630, 52, 725, 108]
SourceBlock "dspfactors/Singular Value\nDecomposition"
SourceType "Singular Value Decomposition"
wantv on
Port {
PortNumber 3
Name "princomp"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [395, 130, 415, 150]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Terminator
Name "Terminator"
Position [780, 50, 800, 70]
ShowName off
}
Block {
BlockType Terminator
Name "Terminator1"
Position [810, 70, 830, 90]
ShowName off
}
Block {
BlockType SubSystem
Name "centerx"
Ports [3, 1]
Position [390, 35, 475, 105]
TreatAsAtomicUnit on
Port {
PortNumber 1
Name "centerx"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
System {
Name "centerx"
Location [461, 350, 959, 650]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "106"
Block {
BlockType Inport
Name "In1"
Position [125, 53, 155, 67]
}
Block {
BlockType Inport
Name "In2"
Position [280, 168, 310, 182]
Port "2"
}
Block {
BlockType Inport
Name "In3"
Position [125, 118, 155, 132]
Port "3"
}
Block {
BlockType Assignment
Name "Assignment"
Ports [3, 1]
Position [520, 35, 570, 195]
InputType "Matrix"
ElementSrc "External"
Rows "-1"
ColumnSrc "External"
}
Block {
BlockType ForIterator
Name "For Iterator"
Ports [1, 1]
Position [190, 110, 235, 140]
ShowName off
IterationSource "external"
}
Block {
BlockType Selector
Name "Selector"
Ports [2, 1]
Position [350, 166, 390, 204]
ShowName off
InputType "Matrix"
ElementSrc "External"
Elements "[1 3]"
Rows "-1"
ColumnSrc "External"
Columns "-1"
InputPortWidth "3"
}
Block {
BlockType Selector
Name "Selector1"
Ports [2, 1]
Position [350, 96, 390, 134]
ShowName off
InputType "Matrix"
ElementSrc "External"
Elements "[1 3]"
Rows "-1"
ColumnSrc "External"
Columns "-1"
InputPortWidth "3"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [435, 105, 455, 125]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Outport
Name "Out1"
Position [620, 108, 650, 122]
}
Line {
SrcBlock "In3"
SrcPort 1
DstBlock "For Iterator"
DstPort 1
}
Line {
SrcBlock "Assignment"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
Points [145, 0]
Branch {
DstBlock "Assignment"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "Selector1"
DstPort 1
}
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "For Iterator"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Selector1"
DstPort 2
}
Branch {
Points [0, 70]
Branch {
DstBlock "Selector"
DstPort 2
}
Branch {
Points [0, 80; 240, 0; 0, -105]
DstBlock "Assignment"
DstPort 3
}
}
}
Line {
SrcBlock "Selector1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Selector"
SrcPort 1
Points [50, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Assignment"
DstPort 2
}
Annotation {
Name "This FOR Iterator subsystem needed to b"
"e done to\ntake advantage of scalar expansion\non the summation block in the "
"above diagram. A loop needed\nto be implemented to allow an arbitrary number"
"\nof columns for the input matrix to the PCA block.\n\nIt was opted not to at"
"tempt to REPMAT the row \nvector input into the size of the input matrix as\n"
"the PRINCOMP command does. The above\nimplemented scalar exansion route was "
"choosen, as\nthe REPMAT approach was not obviously doable due to\nthe REPMAT "
"number would be needed to be an input port\nfrom Simulink, which would then i"
"mply dynamic signal width;\na capability that Simulink does not ahve today\n("
"ie no dynamic memory during simulation)."
Position [655, 309]
}
}
}
Block {
BlockType Outport
Name "princomp"
Position [805, 93, 835, 107]
}
Line {
Name "A"
Labels [0, 0]
SrcBlock "A"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, 105]
DstBlock "Probe"
DstPort 1
}
Branch {
Labels [1, 0]
Points [60, 0]
Branch {
DstBlock "centerx"
DstPort 1
}
Branch {
Points [0, 25]
DstBlock "Mean"
DstPort 1
}
}
}
Line {
SrcBlock "Probe"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
Name "m"
Labels [0, 0]
SrcBlock "Demux"
SrcPort 1
DstBlock "Goto"
DstPort 1
}
Line {
Name "n"
Labels [1, 0]
SrcBlock "Demux"
SrcPort 2
DstBlock "Goto1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [50, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "From"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Math\nFunction1"
DstPort 1
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "centerx"
DstPort 3
}
Line {
Name "princomp"
Labels [0, 0]
SrcBlock "Singular Value\nDecomposition"
SrcPort 3
DstBlock "princomp"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Singular Value\nDecomposition"
DstPort 1
}
Line {
SrcBlock "Math\nFunction1"
SrcPort 1
Points [20, 0; 0, -55]
DstBlock "Product"
DstPort 2
}
Line {
Name "centerx"
Labels [0, 0]
SrcBlock "centerx"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
Name "mean_A"
Labels [0, 0]
SrcBlock "Mean"
SrcPort 1
DstBlock "centerx"
DstPort 2
}
Line {
SrcBlock "Singular Value\nDecomposition"
SrcPort 2
DstBlock "Terminator1"
DstPort 1
}
Line {
SrcBlock "Singular Value\nDecomposition"
SrcPort 1
DstBlock "Terminator"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Out1"
Position [430, 213, 460, 227]
}
Line {
Name "A_in"
Labels [0, 0]
SrcBlock "In1"
SrcPort 1
DstBlock "PCA"
DstPort 1
}
Line {
Name "princomp_out"
Labels [0, 0]
SrcBlock "PCA"
SrcPort 1
Points [80, 0]
Branch {
DstBlock "Display"
DstPort 1
}
Branch {
Points [0, 95]
DstBlock "Out1"
DstPort 1
}
}
Annotation {
Name "This is the same example that is used in the\nM"
"ATLAB PRINCOMP documentation.\nType >> DOC PRINCOMP"
Position [207, 241]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -