📄 fourier.mdl
字号:
}
Block {
BlockType Gain
Name "Gain4"
Position [95, 240, 125, 270]
Gain "0"
}
Block {
BlockType Gain
Name "Gain5"
Position [95, 290, 125, 320]
Gain "0"
}
Block {
BlockType Reference
Name "Repeating\nSequence"
Ports [0, 1]
Position [445, 300, 475, 330]
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"
rep_seq_t "[0 0.25 0.5]"
rep_seq_y "[0 5 0]"
}
Block {
BlockType Reference
Name "Repeating\nSequence1"
Ports [0, 1]
Position [445, 240, 475, 270]
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"
rep_seq_t "[0 .5]"
rep_seq_y "[1 0]"
}
Block {
BlockType Reference
Name "Repeating\nSequence2"
Ports [0, 1]
Position [445, 360, 475, 390]
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"
rep_seq_t "[0 .05 .1]"
rep_seq_y "[-1 1 -1]"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [360, 159, 390, 191]
Location [402, 362, 726, 601]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "10"
DataFormat "StructureWithTime"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [445, 120, 475, 150]
WaveForm "square"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator1"
Position [445, 180, 475, 210]
WaveForm "square"
Amplitude ".25"
Frequency "10"
}
Block {
BlockType Sum
Name "Sum"
Ports [5, 1]
Position [225, 162, 250, 288]
ShowName off
Inputs "|+++++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [305, 328, 330, 382]
ShowName off
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [300, 210, 360, 240]
VariableName "wave_sum"
MaxDataPoints "inf"
SampleTime "1/2000"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [525, 70, 585, 100]
VariableName "time"
MaxDataPoints "inf"
SampleTime "1/2000"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [515, 120, 595, 150]
VariableName "square_wave"
MaxDataPoints "inf"
SampleTime "1/2000"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [505, 300, 595, 330]
VariableName "triangle_wave"
MaxDataPoints "inf"
SampleTime "1/2000"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace4"
Position [505, 240, 595, 270]
VariableName "sawtooth_wave"
MaxDataPoints "inf"
SampleTime "1/2000"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace5"
Position [495, 179, 610, 211]
VariableName "small_square_wave"
MaxDataPoints "inf"
SampleTime "1/2000"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace6"
Position [505, 360, 595, 390]
VariableName "small_triangle_wave"
MaxDataPoints "inf"
SampleTime "1/2000"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace7"
Position [355, 330, 415, 360]
VariableName "total_sum"
MaxDataPoints "inf"
SampleTime "1/2000"
SaveFormat "Array"
}
Block {
BlockType Sin
Name "sine1"
Position [40, 90, 70, 120]
SineType "Time based"
Frequency "6.2832"
SampleTime "0"
}
Block {
BlockType Sin
Name "sine2"
Position [40, 140, 70, 170]
SineType "Time based"
Frequency "6.2832"
SampleTime "0"
}
Block {
BlockType Sin
Name "sine3"
Position [40, 190, 70, 220]
SineType "Time based"
Frequency "6.2832"
SampleTime "0"
}
Block {
BlockType Sin
Name "sine4"
Position [40, 240, 70, 270]
SineType "Time based"
Frequency "6.2832"
SampleTime "0"
}
Block {
BlockType Sin
Name "sine5"
Position [40, 290, 70, 320]
SineType "Time based"
Frequency "6.2832"
SampleTime "0"
}
Line {
SrcBlock "sine1"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "sine2"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "sine3"
SrcPort 1
DstBlock "Gain3"
DstPort 1
}
Line {
SrcBlock "sine4"
SrcPort 1
DstBlock "Gain4"
DstPort 1
}
Line {
SrcBlock "sine5"
SrcPort 1
DstBlock "Gain5"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [75, 0; 0, 90]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [60, 0; 0, 60]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Gain3"
SrcPort 1
Points [40, 0; 0, 30]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Gain4"
SrcPort 1
DstBlock "Sum"
DstPort 4
}
Line {
SrcBlock "Gain5"
SrcPort 1
Points [40, 0; 0, -30]
DstBlock "Sum"
DstPort 5
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [15, 0]
Branch {
Points [0, -50]
DstBlock "Scope"
DstPort 1
}
Branch {
Points [10, 0]
Branch {
DstBlock "To Workspace"
DstPort 1
}
Branch {
Points [0, 120]
DstBlock "Sum1"
DstPort 1
}
}
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "To Workspace1"
DstPort 1
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "To Workspace2"
DstPort 1
}
Line {
SrcBlock "Repeating\nSequence"
SrcPort 1
DstBlock "To Workspace3"
DstPort 1
}
Line {
SrcBlock "Repeating\nSequence1"
SrcPort 1
DstBlock "To Workspace4"
DstPort 1
}
Line {
SrcBlock "Signal\nGenerator1"
SrcPort 1
DstBlock "To Workspace5"
DstPort 1
}
Line {
SrcBlock "Repeating\nSequence2"
SrcPort 1
DstBlock "To Workspace6"
DstPort 1
}
Line {
SrcBlock "DC offset"
SrcPort 1
Points [215, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "To Workspace7"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -