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

📄 c7fstr1.mdl

📁 matlab的大量实例代码
💻 MDL
📖 第 1 页 / 共 2 页
字号:
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  Points		  [25, 0; 0, -65]
	  DstBlock		  "Switch1"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Abs"
	  SrcPort		  1
	  DstBlock		  "Relational\nOperator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Relational\nOperator"
	  SrcPort		  1
	  DstBlock		  "Switch1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Fstatic"
	  SrcPort		  1
	  Points		  [125, 0]
	  Branch {
	    Points		    [0, 30]
	    DstBlock		    "Product"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -35]
	    DstBlock		    "Relational\nOperator"
	    DstPort		    2
	  }
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "stuck\nmodel"
      Ports		      [3, 1]
      Position		      [575, 107, 670, 183]
      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			"stuck\nmodel"
	Location		[257, 457, 812, 717]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Fsum"
	  Position		  [20, 101, 40, 119]
	  Port			  "1"
	  LatchInput		  off
	  PortDimensions	  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "novelocity"
	  Position		  [20, 136, 40, 154]
	  Port			  "2"
	  LatchInput		  off
	  PortDimensions	  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "Fstatic"
	  Position		  [20, 171, 40, 189]
	  Port			  "3"
	  LatchInput		  off
	  PortDimensions	  "1"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Demux
	  Name			  " Demux "
	  Ports			  [1, 1]
	  Position		  [270, 180, 320, 220]
	  Outputs		  "1"
	  BusSelectionMode	  off
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  " SFunction "
	  Tag			  "Stateflow S-Function c7fstr1 1"
	  Ports			  [3, 2]
	  Position		  [180, 100, 230, 180]
	  FunctionName		  "sf_sfun"
	  PortCounts		  "[3 2]"
	  SFunctionModules	  "''"
	  Port {
	    PortNumber		    2
	    Name		    "stuck"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	  }
	}
	Block {
	  BlockType		  Terminator
	  Name			  " Terminator "
	  Position		  [460, 191, 480, 209]
	}
	Block {
	  BlockType		  Outport
	  Name			  "stuck"
	  Position		  [460, 101, 480, 119]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  1
	  Points		  [0, 80]
	  DstBlock		  " Demux "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " Demux "
	  SrcPort		  1
	  DstBlock		  " Terminator "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fsum"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "novelocity"
	  SrcPort		  1
	  Points		  [120, 0]
	  DstBlock		  " SFunction "
	  DstPort		  2
	}
	Line {
	  Name			  "stuck"
	  Labels		  [0, 0]
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "stuck"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fstatic"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  3
	}
      }
    }
    Block {
      BlockType		      Outport
      Name		      "Out1"
      Position		      [645, 28, 675, 42]
      Port		      "1"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "Out1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Hit \nCrossing"
      SrcPort		      1
      DstBlock		      "stuck\nmodel"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Input Force"
      SrcPort		      1
      Points		      [0, 0; 20, 0]
      Branch {
	Points			[0, -95]
	DstBlock		"Mux"
	DstPort			1
      }
      Branch {
	DstBlock		"Sum1"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Int"
      SrcPort		      state
      Points		      [0, -17; 100, 0; 0, 55]
      DstBlock		      "Hit \nCrossing"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Sum1"
      SrcPort		      1
      Points		      [0, 0; 5, 0]
      Branch {
	DstBlock		"Sum2"
	DstPort			1
      }
      Branch {
	Points			[0, 35]
	DstBlock		"friction force"
	DstPort			1
      }
      Branch {
	Points			[0, -45; 400, 0; 0, 45]
	DstBlock		"stuck\nmodel"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "friction force"
      SrcPort		      1
      Points		      [20, 0]
      DstBlock		      "Sum2"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Gain"
      SrcPort		      1
      DstBlock		      "Int"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Int"
      SrcPort		      1
      Points		      [0, 0; 5, 0]
      Branch {
	DstBlock		"Int1"
	DstPort			1
      }
      Branch {
	Points			[0, 100; -255, 0; 0, -30]
	DstBlock		"friction force"
	DstPort			4
      }
    }
    Line {
      SrcBlock		      "Sum2"
      SrcPort		      1
      DstBlock		      "Gain"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Int1"
      SrcPort		      1
      Points		      [0, 0; 10, 0]
      Branch {
	Points			[0, -85]
	DstBlock		"Mux"
	DstPort			2
      }
      Branch {
	Points			[0, 170]
	DstBlock		"Gain1"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "stuck\nmodel"
      SrcPort		      1
      Points		      [10, 0; 0, 125; -315, 0]
      Branch {
	Points			[-220, 0; 0, -85]
	DstBlock		"friction force"
	DstPort			3
      }
      Branch {
	DstBlock		"Int"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Gain1"
      SrcPort		      1
      Points		      [-115, 0]
      DstBlock		      "Sum1"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Constant1"
      SrcPort		      1
      Points		      [0, 0; 40, 0]
      Branch {
	DstBlock		"friction force"
	DstPort			2
      }
      Branch {
	Points			[0, 80; 445, 0; 0, -80]
	DstBlock		"stuck\nmodel"
	DstPort			3
      }
    }
    Annotation {
      Position		      [435, 120]
      Text		      "v"
    }
    Annotation {
      Position		      [376, 111]
      Text		      "a"
    }
    Annotation {
      Position		      [54, 232]
      Text		      "c7fstr1.mdl"
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
  }
}

# Finite State Machines
# -- File save dated 27-Sep-2001 08:40:17
#
#    Stateflow Version 4.1 (R12.1) dated May 21 2001, 01:15:03
#
#

Stateflow {

	machine {
		id                   		1
		name                 		"c7fstr1"
		created              		"17-Sep-2001 08:08:52"
		isLibrary            		0
		firstTarget          		13
		sfVersion            		41012101
	}

	chart {
		id                       		2
		name                     		"stuck\n"
					"model"
		windowPosition           		[264.75 154.5 358.5 204]
		viewLimits               		[0 315 3.48 171.481]
		screen                   		[1 1 1024 768 1.333333333333333]
		treeNode                 		[0 3 0 0]
		firstTransition          		5
		viewObj                  		2
		visible                  		1
		machine                  		1
		subviewS {
		}
		decomposition            		CLUSTER_CHART
		firstData                		8
		chartFileNumber          		1
	}

	state {
		id             		3
		labelString    		"stuck/\n"
						"entry: stuck=1;"
		position       		[52.625 32.625 90 60]
		fontSize       		12
		chart          		2
		treeNode       		[2 0 0 4]
		subviewer      		2
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		4
		labelString    		"sliding/\n"
						"entry: stuck=0;"
		position       		[209 102.75 84 53.25]
		fontSize       		12
		chart          		2
		treeNode       		[2 0 3 0]
		subviewer      		2
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	transition {
		id             		5
		labelPosition  		[157.871 34.906 8.23 14.933]
		fontSize       		12
		src {
			intersection		[0 0 0 0.6914 166.751 18.961 0 11.4845]
		}
		dst {
			id          		3
			intersection		[2 1 0 0.1044 142.625 38.889 0 0]
		}
		midPoint       		[159.3572 31.9526]
		chart          		2
		linkNode       		[2 0 6]
		dataLimits     		[142.625 166.751 18.961 41.289]
		subviewer      		2
		drawStyle      		SMART
	}

	transition {
		id             		6
		labelString    		"[fabs(Fsum)>Fstatic]"
		labelPosition  		[183.247 34.327 108.492 14.933]
		fontSize       		12
		src {
			id          		3
			intersection		[2 1 0 0.3125 142.625 51.375 0 -41.25]
		}
		dst {
			id          		4
			intersection		[1 0 -1 0.4911 250.25 102.75 0 41.25]
		}
		midPoint       		[214.177 58.95]
		chart          		2
		linkNode       		[2 5 7]
		dataLimits     		[142.625 252.65 50.788 102.75]
		subviewer      		2
		drawStyle      		SMART
		slide {
			sticky        		BOTH_STICK
		}
	}

	transition {
		id             		7
		labelString    		"[novelocity & (fabs(Fsum)<=Fstatic)]"
		labelPosition  		[17.957 125.666 187.803 14.933]
		fontSize       		12
		src {
			id          		4
			intersection		[4 -1 0 0.7562 209 115.735 0 -12.985]
		}
		dst {
			id          		3
			intersection		[3 0 1 0.1443 129.64 92.625 0 12.985]
		}
		midPoint       		[156.8697 118.4485]
		chart          		2
		linkNode       		[2 6 0]
		dataLimits     		[127.24 209 92.625 119.514]
		subviewer      		2
		drawStyle      		SMART
		slide {
			sticky        		BOTH_STICK
		}
	}

	data {
		id               		8
		name             		"Fsum"
		linkNode         		[2 0 9]
		scope            		INPUT_DATA
		machine          		1
		dataType         		"double"
		props {
			range {
				minimum		""
				maximum		""
			}
		}
	}

	data {
		id               		9
		name             		"novelocity"
		linkNode         		[2 8 10]
		scope            		INPUT_DATA
		machine          		1
		dataType         		"double"
		props {
			range {
				minimum		""
				maximum		""
			}
		}
	}

	data {
		id               		10
		name             		"stuck"
		linkNode         		[2 9 11]
		scope            		OUTPUT_DATA
		machine          		1
		dataType         		"double"
		props {
			range {
				minimum		""
				maximum		""
			}
		}
	}

	data {
		id               		11
		name             		"Fstatic"
		linkNode         		[2 10 0]
		scope            		INPUT_DATA
		machine          		1
		dataType         		"double"
		props {
			range {
				minimum		""
				maximum		""
			}
		}
	}

	instance {
		id     		12
		name   		"stuck\n"
					"model"
		machine		1
		chart  		2
	}

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

	target {
		id               		14
		name             		"rtw"
		codeFlags        		" comments=0 preservenames=0 preservenameswithparent=0 export"
						"charts=0 statebitsets=0 databitsets=1"
		machine          		1
		linkNode         		[1 13 0]
	}
}

⌨️ 快捷键说明

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