⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sim34.mdl

📁 matlab源代码,适用于开发研究,带来很好的学习效果.
💻 MDL
📖 第 1 页 / 共 2 页
字号:
    Block {
      BlockType		      Sin
      SineType		      "Time based"
      TimeSource	      "Use simulation time"
      Amplitude		      "1"
      Bias		      "0"
      Frequency		      "1"
      Phase		      "0"
      Samples		      "10"
      Offset		      "0"
      SampleTime	      "-1"
      VectorParams1D	      on
    }
    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		      UnitDelay
      X0		      "0"
      SampleTime	      "1"
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
  }
  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		    "Sim34"
    Location		    [2, 82, 1014, 721]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      DiscretePulseGenerator
      Name		      "Discrete Pulse\nGenerator"
      Ports		      [0, 1]
      Position		      [55, 156, 100, 194]
      BackgroundColor	      "[0.501961, 0.000000, 1.000000]"
      Period		      "20"
      PulseWidth	      "10"
      SampleTime	      ".25"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [555, 256, 560, 294]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux1"
      Ports		      [2, 1]
      Position		      [580, 296, 585, 334]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux2"
      Ports		      [2, 1]
      Position		      [585, 341, 590, 379]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [3]
      Position		      [635, 276, 685, 354]
      BackgroundColor	      "[0.000000, 1.000000, 0.250980]"
      Location		      [5, 54, 1029, 741]
      Open		      off
      NumInputPorts	      "3"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
	axes3			"%<SignalLabel>"
      }
      TimeRange		      "25"
      YMin		      "-5~-5~-5"
      YMax		      "5~5~5"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave"
      Ports		      [0, 1]
      Position		      [60, 265, 100, 305]
      BackgroundColor	      "[0.501961, 0.000000, 1.000000]"
      SineType		      "Sample based"
      Amplitude		      "2"
      Samples		      "20"
      SampleTime	      ".25"
    }
    Block {
      BlockType		      SubSystem
      Name		      "enab1"
      Ports		      [1, 2, 1]
      Position		      [165, 211, 230, 249]
      BackgroundColor	      "magenta"
      TreatAsAtomicUnit	      on
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"enab1"
	Location		[2, 82, 1014, 721]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [225, 136, 265, 154]
	  BackgroundColor	  "[0.501961, 0.501961, 0.752941]"
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  EnablePort
	  Name			  "Enable"
	  Ports			  []
	  Position		  [305, 50, 342, 85]
	  BackgroundColor	  "[1.000000, 0.000000, 1.000000]"
	  AttributesFormatString  "States when enabling = %<StatesWhenEnabling"
">"
	  StatesWhenEnabling	  "reset"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [125, 200, 155, 230]
	  BackgroundColor	  "[0.501961, 0.501961, 0.752941]"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [200, 195, 240, 235]
	  BackgroundColor	  "[0.501961, 0.000000, 0.501961]"
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|++"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay"
	  Position		  [250, 254, 285, 296]
	  Orientation		  "left"
	  BackgroundColor	  "[0.501961, 0.000000, 0.501961]"
	  SampleTime		  ".25"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [375, 136, 415, 154]
	  BackgroundColor	  "[0.501961, 0.501961, 0.752941]"
	  AttributesFormatString  "IC=%<InitialOutput>\\nOutput when disabled="
"%<OutputWhenDisabled>"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	  OutputWhenDisabled	  "reset"
	  InitialOutput		  "5"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out2"
	  Position		  [375, 206, 415, 224]
	  BackgroundColor	  "[0.501961, 0.501961, 0.752941]"
	  AttributesFormatString  "IC = %<InitialOutput>\\nOutput when disable"
"d = %<OutputWhenDisabled>"
	  Port			  "2"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  Points		  [0, 0; 55, 0]
	  Branch {
	    DstBlock		    "Out1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 130]
	    DstBlock		    "Unit Delay"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Out2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  Labels		  [0, 0]
	  SrcBlock		  "Unit Delay"
	  SrcPort		  1
	  Points		  [-25, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Annotation {
	  Position		  [523, 279]
	}
	Annotation {
	  Position		  [486, 187]
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "enab2"
      Ports		      [1, 2, 1]
      Position		      [355, 216, 420, 254]
      BackgroundColor	      "magenta"
      TreatAsAtomicUnit	      on
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"enab2"
	Location		[2, 82, 1014, 721]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [155, 145, 205, 165]
	  BackgroundColor	  "[0.501961, 0.501961, 1.000000]"
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  EnablePort
	  Name			  "Enable"
	  Ports			  []
	  Position		  [240, 56, 276, 90]
	  BackgroundColor	  "magenta"
	  AttributesFormatString  "States when enabling = %<StatesWhenEnabling"
">"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [60, 215, 90, 245]
	  BackgroundColor	  "[0.501961, 0.501961, 1.000000]"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [145, 215, 175, 245]
	  BackgroundColor	  "[0.501961, 0.000000, 0.501961]"
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|++"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay"
	  Position		  [195, 284, 230, 326]
	  Orientation		  "left"
	  BackgroundColor	  "[0.501961, 0.000000, 0.501961]"
	  SampleTime		  ".25"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [315, 146, 365, 164]
	  BackgroundColor	  "[0.501961, 0.501961, 1.000000]"
	  AttributesFormatString  "IC=%<InitialOutput>\\nOutput when disabled="
"%<OutputWhenDisabled>"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	  InitialOutput		  "1"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out2"
	  Position		  [320, 220, 370, 240]
	  BackgroundColor	  "[0.501961, 0.501961, 1.000000]"
	  AttributesFormatString  "IC = %<InitialOutput>\\nOutput when disable"
"d = %<OutputWhenDisabled>"
	  Port			  "2"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Unit Delay"
	  SrcPort		  1
	  Points		  [-30, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Out2"
	  DstPort		  1
	}
	Line {
	  Labels		  [1, 0]
	  SrcBlock		  "In1"
	  SrcPort		  1
	  Points		  [50, 0]
	  Branch {
	    DstBlock		    "Out1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 150]
	    DstBlock		    "Unit Delay"
	    DstPort		    1
	  }
	}
	Annotation {
	  Position		  [369, 128]
	}
	Annotation {
	  Position		  [558, 241]
	}
      }
    }
    Line {
      SrcBlock		      "enab1"
      SrcPort		      1
      Points		      [15, 0; 0, 85]
      DstBlock		      "Mux1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "enab2"
      SrcPort		      1
      Points		      [40, 0; 0, 125]
      DstBlock		      "Mux2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Discrete Pulse\nGenerator"
      SrcPort		      1
      Points		      [90, 0]
      Branch {
	Labels			[1, 0]
	Points			[190, 0]
	Branch {
	  DstBlock		  "enab2"
	  DstPort		  enable
	}
	Branch {
	  Points		  [130, 0; 0, 90]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
      }
      Branch {
	DstBlock		"enab1"
	DstPort			enable
      }
    }
    Line {
      Labels		      [1, 0]
      SrcBlock		      "Sine Wave"
      SrcPort		      1
      Points		      [25, 0]
      Branch {
	Points			[0, -55]
	DstBlock		"enab1"
	DstPort			1
      }
      Branch {
	Labels			[1, 0]
	Points			[205, 0]
	Branch {
	  Points		  [0, -50]
	  DstBlock		  "enab2"
	  DstPort		  1
	}
	Branch {
	  Labels		  [1, 0]
	  DstBlock		  "Mux"
	  DstPort		  2
	}
      }
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      Points		      [50, 0; 0, 15]
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux1"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      2
    }
    Line {
      Labels		      [2, 0]
      SrcBlock		      "enab1"
      SrcPort		      2
      Points		      [35, 0; 0, 85]
      DstBlock		      "Mux1"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Mux2"
      SrcPort		      1
      Points		      [20, 0; 0, -20]
      DstBlock		      "Scope"
      DstPort		      3
    }
    Line {
      SrcBlock		      "enab2"
      SrcPort		      2
      Points		      [60, 0; 0, 125]
      DstBlock		      "Mux2"
      DstPort		      2
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -