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

📄 cont_updates.mdl

📁 这是关于matlab stateflow的源码例子
💻 MDL
字号:
Model {
  Name			  "cont_updates"
  Version		  3.00
  SimParamPage		  "Solver"
  SampleTimeColors	  off
  InvariantConstants	  off
  WideVectorLines	  off
  ShowLineWidths	  off
  ShowPortDataTypes	  off
  StartTime		  "0.0"
  StopTime		  "10.0"
  SolverMode		  "Auto"
  Solver		  "ode45"
  RelTol		  "1e-3"
  AbsTol		  "auto"
  Refine		  "1"
  MaxStep		  "0.1"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  on
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  on
  OutputSaveName	  "yout"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Matrix"
  LimitMaxRows		  off
  MaxRows		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  "warning"
  MinStepSizeMsg	  "warning"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  IntegerOverflowMsg	  "warning"
  UnnecessaryDatatypeConvMsg "none"
  Int32ToFloatConvMsg	  "warning"
  SignalLabelMismatchMsg  "none"
  ConsistencyChecking	  "off"
  ZeroCross		  on
  SimulationMode	  "normal"
  BlockDataTips		  on
  BlockParametersDataTip  on
  BlockAttributesDataTip  off
  BlockPortWidthsDataTip  off
  BlockDescriptionStringDataTip	off
  BlockMaskParametersDataTip off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  OptimizeBlockIOStorage  on
  BufferReuse		  on
  BooleanDataType	  off
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "oneshot"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  off
  Created		  "Thu Jan 21 13:44:23 1999"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "pgoddard"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Wed Mar 10 08:42:43 1999"
  ModelVersionFormat	  "1.%<AutoIncrement:5>"
  ConfigurationManager	  "none"
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    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		    "cont_updates"
    Location		    [7, 76, 365, 185]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "automatic"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    AutoZoom		    on
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "Rectifier"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [150, 24, 210, 76]
      ShowPortLabels	      on
      MaskType		      "Stateflow"
      MaskDescription	      "Stateflow diagram"
      MaskDisplay	      "plot(sf('Private','sfblk','xIcon'),sf('Private'"
",'sfblk','yIcon'));text(0.5,0,sf('Private', 'sfblk', 'tIcon'),'HorizontalAl',"
"'Center','VerticalAl','Bottom');"
      MaskSelfModifiable      on
      MaskIconFrame	      off
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Rectifier"
	Location		[257, 457, 812, 717]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "in"
	  Position		  [20, 101, 40, 119]
	  Port			  "1"
	  PortWidth		  "1"
	  SampleTime		  "-1"
	  DataType		  "auto"
	  SignalType		  "auto"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Demux
	  Name			  " Demux "
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [270, 160, 320, 200]
	  Outputs		  "1"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  " SFunction "
	  Tag			  "Stateflow S-Function cont_updates 1"
	  Ports			  [1, 2, 0, 0, 0]
	  Position		  [180, 100, 230, 160]
	  FunctionName		  "sf_sfun"
	  PortCounts		  "[1 2]"
	  SFunctionModules	  "''"
	}
	Block {
	  BlockType		  Terminator
	  Name			  " Terminator "
	  Position		  [460, 171, 480, 189]
	}
	Block {
	  BlockType		  Outport
	  Name			  "out"
	  Position		  [460, 101, 480, 119]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  1
	  Points		  [0, 65]
	  DstBlock		  " Demux "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " Demux "
	  SrcPort		  1
	  DstBlock		  " Terminator "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "out"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1, 0, 0, 0, 0]
      Position		      [260, 34, 290, 66]
      Floating		      off
      Location		      [8, 233, 370, 472]
      Open		      on
      NumInputPorts	      "1"
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      Grid		      "on"
      TimeRange		      "10"
      YMin		      "0"
      YMax		      "1"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      DataFormat	      "StructureWithTime"
      LimitMaxRows	      on
      MaxRows		      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave"
      Position		      [75, 35, 105, 65]
      Amplitude		      "1"
      Frequency		      "1"
      Phase		      "0"
      SampleTime	      "0"
    }
    Line {
      SrcBlock		      "Sine Wave"
      SrcPort		      1
      DstBlock		      "Rectifier"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rectifier"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
  }
}

# Finite State Machines
# -- File save dated 10-Mar-1999 08:42:43
#
#    Stateflow Version 2.0 (R11) dated Jan 21 1999, 19:12:04
#
#

Stateflow {

	machine {
		id         		1
		name       		"cont_updates"
		created    		"21-Jan-1999 13:44:24"
		firstTarget		10
		sfVersion  		20011061
	}

	chart {
		id                     		2
		name                   		"Rectifier"
		windowPosition         		[285 354.75 266.25 187.5]
		viewLimits             		[0 222.75 0 151.5]
		screen                 		[1 1 1024 768 1.333333333333333]
		treeNode               		[0 3 0 0]
		firstTransition        		4
		visible                		1
		machine                		1
		decomposition          		CLUSTER_CHART
		firstData              		7
		updateMethod           		CONTINUOUS
		chartFileNumber        		1
	}

	state {
		id             		3
		labelString    		"S"
		position       		[34.77048196901133 41.25000000000009 90 60]
		fontSize       		12
		chart          		2
		treeNode       		[2 0 0 0]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	transition {
		id           		4
		labelString  		"[in<0]/out=-in;"
		labelPosition		[108.763283285342 7.500000000000156 71.25 15]
		fontSize     		12
		src {
			id          		3
			intersection		[1 0 -1 0.3833333333333334 69.27048196901133 41.25000000000009]
		}
		dst {
			id          		3
			intersection		[2 1 0 0.4 124.7704819690113 65.25000000000009]
		}
		midPoint     		[193.0204819690113 39.75000000000009]
		chart        		2
		linkNode     		[2 0 5]
		dataLimits   		[69.27048196901177 196.5509901711399 24.26092763172686 67.65000000000009]
	}

	transition {
		id           		5
		labelPosition		[19.9126015271231 66.51957059191706 8.25 15]
		fontSize     		12
		src {
			intersection		[0 0 0 0 17.25599890305767 64.50000000000011]
		}
		dst {
			id          		3
			intersection		[4 -1 0 0.4625 34.77048196901133 73.50000000000009]
		}
		midPoint     		[20.94592317951185 68.34055231363534]
		chart        		2
		linkNode     		[2 4 6]
		dataLimits   		[17.25599890305767 34.77048196901133 64.50000000000011 75.90000000000009]
	}

	transition {
		id           		6
		labelString  		"[in>=0]/out=in;"
		labelPosition		[81.01045523104341 122.2500000000001 74.25 15]
		fontSize     		12
		src {
			id          		3
			intersection		[3 0 1 0.6333333333333333 67.77048196901133 101.2500000000001]
		}
		dst {
			id          		3
			intersection		[2 1 0 0.7375 124.7704819690113 85.50000000000009]
		}
		midPoint     		[188.5204819690113 111.0000000000001]
		chart        		2
		linkNode     		[2 5 0]
		dataLimits   		[67.77048196901131 192.2275741867753 83.10000000000008 124.229279385606]
	}

	data {
		id         		7
		name       		"in"
		linkNode   		[2 0 8]
		scope      		INPUT_DATA
		machine    		1
		dataType   		"double"
	}

	data {
		id         		8
		name       		"out"
		linkNode   		[2 7 0]
		scope      		OUTPUT_DATA
		machine    		1
		dataType   		"double"
	}

	instance {
		id     		9
		name   		"Rectifier"
		machine		1
		chart  		2
	}

	target {
		id               		10
		name             		"sfun"
		description      		"Default Simulink S-Function Target."
		machine          		1
		linkNode         		[1 0 0]
	}
}

⌨️ 快捷键说明

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