📄 dtmf.mdl
字号:
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Inport
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Lookup
InputValues "[-4:5]"
OutputValues " rand(1,10)-0.5"
LookUpMeth "Interpolation-Extrapolation"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
LUTDesignTableMode "Redesign Table"
LUTDesignDataSource "Block Dialog"
LUTDesignFunctionName "sqrt(x)"
LUTDesignUseExistingBP on
LUTDesignRelError "0.01"
LUTDesignAbsError "1e-6"
}
Block {
BlockType Merge
Inputs "2"
InitialOutput "[]"
AllowUnequalInputPortWidths off
InputPortOffsets "[]"
}
Block {
BlockType Outport
Port "1"
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType RandomNumber
Mean "0"
Variance "1"
Seed "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType Reference
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Selector
InputType "Vector"
IndexMode "One-based"
ElementSrc "Internal"
Elements "1"
RowSrc "Internal"
Rows "1"
ColumnSrc "Internal"
Columns "1"
InputPortWidth "-1"
IndexIsStartValue off
OutputPortSize "1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Terminator
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
Block {
BlockType TriggerPort
TriggerType "rising"
StatesWhenEnabling "inherit"
ShowOutputPort off
OutputDataType "auto"
SampleTimeType "triggered"
SampleTime "1"
ZeroCross on
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "dtmf"
Location [75, 172, 829, 497]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 128
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "D:\\Applications\\MatlabR11\\toolbox\\rptgenext\\"
"simulink-images.rpt"
Block {
BlockType SubSystem
Name "Channel"
Ports [1, 1]
Position [355, 115, 405, 185]
ShowName off
ShowPortLabels off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "Noise power|Sample Rate (Hz)|Framesize|Gain"
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 ",,,"
MaskVariables "var=@1;Fs=@2;Framesize=@3;g=@4;"
MaskDisplay "disp('Channel')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString ".04|Fs|Framesize|2"
MaskTabNameString ",,,"
Port {
PortNumber 1
Name "tones + noise"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "Channel"
Location [268, 310, 610, 496]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Gain
Name "Gain"
Position [100, 25, 130, 55]
Gain "g"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [180, 25, 210, 55]
ShowName off
IconShape "round"
Inputs "|++"
}
Block {
BlockType RandomNumber
Name "Vector of Noise"
Position [100, 110, 130, 140]
Variance "var"
Seed "[1:Framesize]"
SampleTime "Framesize/Fs"
}
Block {
BlockType Outport
Name "Out1"
Position [270, 33, 300, 47]
IconDisplay "Port number"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
Labels [1, 0]
SrcBlock "Gain"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Vector of Noise"
SrcPort 1
Points [60, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "DTMF Generator"
Ports [1, 1]
Position [210, 115, 295, 185]
ShowName off
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "Sample Rate (Hz)|Framesize (Samples)"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "Fs=@1;Framesize=@2;"
MaskDisplay "disp('DTMF\\nGenerator')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Fs|Framesize"
MaskTabNameString ","
Port {
PortNumber 1
Name "tones"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
ShowSigGenPortName on
}
System {
Name "DTMF Generator"
Location [285, 218, 797, 523]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [35, 113, 65, 127]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType SubSystem
Name "Digit to Tone"
Ports [1, 1, 1]
Position [260, 92, 365, 148]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Digit to Tone"
Location [30, 112, 550, 359]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 48, 55, 62]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [30, 100, 50, 120]
}
Block {
BlockType SubSystem
Name "Column Tones\n1209Hz 1336Hz 1477Hz"
Ports [1, 1]
Position [195, 122, 275, 178]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Column Tones\n1209Hz 1336Hz 1477Hz"
Location [173, 203, 837, 583]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Column"
Position [20, 193, 50, 207]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType SubSystem
Name "1209 Hz"
Ports [0, 1, 1]
Position [295, 83, 340, 137]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "1209 Hz"
Location [277, 116, 858, 575]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [175, 30, 195, 50]
}
Block {
BlockType Reference
Name "Sine Wave"
Ports [0, 1]
Position [170, 110, 200, 140]
SourceBlock "dspsrcs2/Sine Wave"
SourceType "Sine Wave"
Amplitude "1"
Frequency "1209"
Phase "0"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric Fcn"
SampleTime "1/Fs"
SamplesPerFrame "Framesize"
ResetState "Restart at time zero"
}
Block {
BlockType Outport
Name "Out1"
Position [320, 118, 350, 132]
IconDisplay "Port number"
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -