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

📄 func_call_ex.mdl

📁 这是关于matlab stateflow的源码例子
💻 MDL
📖 第 1 页 / 共 2 页
字号:
Model {
  Name			  "func_call_ex"
  Version		  4.00
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Tue Aug 29 14:05:12 2000"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "vhodges"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Tue Aug 29 15:44:16 2000"
  ModelVersionFormat	  "1.%<AutoIncrement:1>"
  ConfigurationManager	  "none"
  DefaultBlockFontName	  "MS Sans Serif"
  DefaultBlockFontSize	  10
  DefaultBlockFontWeight  "normal"
  DefaultBlockFontAngle	  "normal"
  DefaultAnnotationFontName "MS Sans Serif"
  DefaultAnnotationFontSize 10
  DefaultAnnotationFontWeight "normal"
  DefaultAnnotationFontAngle "normal"
  DefaultLineFontName	  "MS Sans Serif"
  DefaultLineFontSize	  9
  DefaultLineFontWeight	  "normal"
  DefaultLineFontAngle	  "normal"
  SimParamPage		  "Solver"
  StartTime		  "0.0"
  StopTime		  "10.0"
  SolverMode		  "Auto"
  Solver		  "ode45"
  RelTol		  "1e-3"
  AbsTol		  "auto"
  Refine		  "1"
  MaxStep		  "auto"
  MinStep		  "auto"
  MaxNumMinSteps	  "-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		  "Array"
  LimitDataPoints	  on
  MaxDataPoints		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  "warning"
  MinStepSizeMsg	  "warning"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  SingleTaskRateTransMsg  "none"
  MultiTaskRateTransMsg	  "error"
  IntegerOverflowMsg	  "warning"
  CheckForMatrixSingularity "none"
  UnnecessaryDatatypeConvMsg "none"
  Int32ToFloatConvMsg	  "warning"
  SignalLabelMismatchMsg  "none"
  LinearizationMsg	  "none"
  VectorMatrixConversionMsg "none"
  SfunCompatibilityCheckMsg "none"
  BlockPriorityViolationMsg "warning"
  ArrayBoundsChecking	  "none"
  ConsistencyChecking	  "none"
  ZeroCross		  on
  Profile		  off
  SimulationMode	  "normal"
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  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	  on
  ExtModeLogAll		  on
  OptimizeBlockIOStorage  on
  BufferReuse		  on
  ParameterPooling	  on
  BlockReductionOpt	  off
  BooleanDataType	  off
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "MS Sans Serif"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "MS Sans Serif"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "MS Sans Serif"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "func_call_ex"
    Location		    [401, 137, 905, 490]
    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		      "Chart"
      Ports		      [2, 1]
      Position		      [80, 51, 140, 104]
      FontName		      "Helvetica"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      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			"Chart"
	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			  "in1"
	  Position		  [20, 101, 40, 119]
	  Port			  "1"
	  PortDimensions	  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "in2"
	  Position		  [20, 136, 40, 154]
	  Port			  "2"
	  PortDimensions	  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Demux
	  Name			  " Demux "
	  Ports			  [1, 1]
	  Position		  [270, 160, 320, 200]
	  FontName		  "Helvetica"
	  Outputs		  "1"
	  BusSelectionMode	  off
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  " SFunction "
	  Tag			  "Stateflow S-Function func_call_ex 1"
	  Ports			  [2, 2]
	  Position		  [180, 100, 230, 160]
	  FontName		  "Helvetica"
	  FunctionName		  "sf_sfun"
	  PortCounts		  "[2 2]"
	  SFunctionModules	  "''"
	}
	Block {
	  BlockType		  Terminator
	  Name			  " Terminator "
	  Position		  [460, 171, 480, 189]
	  FontName		  "Helvetica"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out1"
	  Position		  [460, 101, 480, 119]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  " Demux "
	  SrcPort		  1
	  DstBlock		  " Terminator "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  1
	  Points		  [0, 65]
	  DstBlock		  " Demux "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "out1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in1"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in2"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  2
	}
      }
    }
  }
}

# Finite State Machines
# -- File save dated 29-Aug-2000 15:44:17
#
#    Stateflow Version 4.0 (R12) dated Jul 19 2000, 17:00:39
#
#

Stateflow {

	machine {
		id             		1
		name           		"func_call_ex"
		created        		"29-Aug-2000 14:05:14"
		firstTarget    		36
		sfVersion      		40012060.000001
	}

	chart {
		id                       		2
		name                     		"Chart"
		windowPosition           		[30.75 65.25 646.5 432]
		viewLimits               		[9.849 470.975 122.291 425.121]
		zoomFactor               		0.765
		screen                   		[1 1 1024 768 1.333333333333333]
		treeNode                 		[0 6 0 0]
		firstTransition          		17
		firstJunction            		13
		viewObj                  		2
		visible                  		1
		machine                  		1
		subviewS {
		}
		decomposition            		CLUSTER_CHART
		firstData                		30
		chartFileNumber          		1
	}

	state {
		id             		3
		labelString    		"y = sum(a,b)"
		position       		[299.056 161.534 46.127 81.713]
		fontSize       		4.883
		arrowSize      		3.255
		chart          		2
		treeNode       		[6 0 5 0]
		firstTransition		14
		firstJunction  		10
		superState     		GROUPED
		isGrouped      		1
		subviewer      		2
		type           		FUNC_STATE
		decomposition  		CLUSTER_STATE
		firstData      		21
	}

	state {
		id             		4
		labelString    		"y = diff(a,b)"
		position       		[409.902 160.042 44.444 84.628]
		fontSize       		4.883
		arrowSize      		3.255
		chart          		2
		treeNode       		[6 0 0 5]
		firstTransition		16
		firstJunction  		12
		superState     		GROUPED
		isGrouped      		1
		subviewer      		2
		type           		FUNC_STATE
		decomposition  		CLUSTER_STATE
		firstData      		24
	}

	state {
		id             		5
		labelString    		"y = product(a,b)"
		position       		[350.616 161.037 52.684 82.044]
		fontSize       		4.883
		arrowSize      		3.255
		chart          		2
		treeNode       		[6 0 4 3]
		firstTransition		15
		firstJunction  		11
		superState     		GROUPED
		isGrouped      		1
		subviewer      		2
		type           		FUNC_STATE
		decomposition  		CLUSTER_STATE
		firstData      		27
	}

	state {
		id             		6
		labelString    		"func_lib"
		position       		[297.862 140.931 160.974 114.708]
		fontSize       		12
		chart          		2
		treeNode       		[2 4 0 7]
		superState     		GROUPED
		subviewer      		2
		type           		GROUP_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		7
		labelString    		"prod_state"
		position       		[116.432 163.3 68.825 45.883]
		fontSize       		12
		chart          		2
		treeNode       		[2 0 6 9]
		subviewer      		2
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		8
		labelString    		"diff_state"
		position       		[206.669 237.86 68.825 45.883]
		fontSize       		12
		chart          		2
		treeNode       		[2 0 9 0]
		subviewer      		2
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		9
		labelString    		"sum_state"
		position       		[22.467 224.955 68.825 45.883]
		fontSize       		12

⌨️ 快捷键说明

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