# $Revision: 1.1.2.2 $
Model {
  Name			  "sf_matrix"
  Version		  6.2
  MdlSubVersion		  0
  GraphicalInterface {
    NumRootInports	    0
    NumRootOutports	    0
    ParameterArgumentNames  ""
    ComputedModelVersion    "1.25"
    NumModelReferences	    0
    NumTestPointedSignals   0
  }
  SavedCharacterEncoding  "US-ASCII"
  SaveDefaultBlockParams  on
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  on
  ShowPortDataTypes	  off
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  ShowStorageClass	  off
  ShowTestPointIcons	  on
  ShowViewerIcons	  on
  SortedOrder		  off
  ExecutionContextIcon	  off
  ShowLinearizationAnnotations on
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovMetricSettings	  "dcmtr"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  "covCumulativeData"
  CovCumulativeReport	  off
  CovReportOnPause	  on
  ScopeRefreshTime	  0.035000
  OverrideScopeRefreshTime on
  DisableAllScopes	  off
  DataTypeOverride	  "UseLocalSettings"
  MinMaxOverflowLogging	  "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Mon Oct 22 15:57:28 2001"
  Creator		  "The MathWorks Inc."
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "batserve"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Sat Jan 22 19:12:10 2005"
  ModelVersionFormat	  "1.%<AutoIncrement:25>"
  ConfigurationManager	  "None"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  ExtModeBatchMode	  off
  ExtModeEnableFloating	  on
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigDurationFloating "auto"
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock off
  BufferReuse		  on
  StrictBusMsg		  "None"
  ProdHWDeviceType	  "32-bit Generic"
  ShowModelReferenceBlockVersion off
  ShowModelReferenceBlockIO off
  Array {
    Type		    "Handle"
    Dimension		    1
    Simulink.ConfigSet {
      $ObjectID		      1
      Version		      "1.1.0"
      Array {
	Type			"Handle"
	Dimension		7
	Simulink.SolverCC {
	  $ObjectID		  2
	  Version		  "1.1.0"
	  StartTime		  "0.0"
	  StopTime		  "1"
	  AbsTol		  "auto"
	  FixedStep		  "auto"
	  InitialStep		  "auto"
	  MaxNumMinSteps	  "-1"
	  MaxOrder		  5
	  ExtrapolationOrder	  4
	  NumberNewtonIterations  1
	  MaxStep		  "1"
	  MinStep		  "auto"
	  RelTol		  "1e-3"
	  SolverMode		  "Auto"
	  Solver		  "ode45"
	  SolverName		  "ode45"
	  ZeroCrossControl	  "UseLocalSettings"
	  AlgebraicLoopSolver	  "TrustRegion"
	  SolverResetMethod	  "Fast"
	  PositivePriorityOrder	  off
	  AutoInsertRateTranBlk	  off
	  SampleTimeConstraint	  "Unconstrained"
	  RateTranMode		  "Deterministic"
	}
	Simulink.DataIOCC {
	  $ObjectID		  3
	  Version		  "1.1.0"
	  Decimation		  "1"
	  ExternalInput		  "[t, u]"
	  FinalStateName	  "xFinal"
	  InitialState		  "xInitial"
	  LimitDataPoints	  on
	  MaxDataPoints		  "1000"
	  LoadExternalInput	  off
	  LoadInitialState	  off
	  SaveFinalState	  off
	  SaveFormat		  "Array"
	  SaveOutput		  on
	  SaveState		  off
	  SignalLogging		  on
	  SaveTime		  on
	  StateSaveName		  "xout"
	  TimeSaveName		  "tout"
	  OutputSaveName	  "yout"
	  SignalLoggingName	  "logsout"
	  OutputOption		  "RefineOutputTimes"
	  OutputTimes		  "[]"
	  Refine		  "1"
	}
	Simulink.OptimizationCC {
	  $ObjectID		  4
	  Array {
	    Type		    "Cell"
	    Dimension		    5
	    Cell		    "ZeroExternalMemoryAtStartup"
	    Cell		    "ZeroInternalMemoryAtStartup"
	    Cell		    "InitFltsAndDblsToZero"
	    Cell		    "OptimizeModelRefInitCode"
	    Cell		    "NoFixptDivByZeroProtection"
	    PropName		    "DisabledProps"
	  }
	  Version		  "1.1.0"
	  BlockReduction	  on
	  BooleanDataType	  off
	  ConditionallyExecuteInputs on
	  InlineParams		  off
	  InlineInvariantSignals  on
	  OptimizeBlockIOStorage  on
	  BufferReuse		  on
	  EnforceIntegerDowncast  on
	  ExpressionFolding	  on
	  FoldNonRolledExpr	  on
	  LocalBlockOutputs	  on
	  ParameterPooling	  on
	  RollThreshold		  5
	  SystemCodeInlineAuto	  off
	  StateBitsets		  off
	  DataBitsets		  off
	  UseTempVars		  off
	  ZeroExternalMemoryAtStartup on
	  ZeroInternalMemoryAtStartup on
	  InitFltsAndDblsToZero	  on
	  NoFixptDivByZeroProtection off
	  EfficientFloat2IntCast  off
	  OptimizeModelRefInitCode off
	  LifeSpan		  "inf"
	  BufferReusableBoundary  on
	}
	Simulink.DebuggingCC {
	  $ObjectID		  5
	  Version		  "1.1.0"
	  RTPrefix		  "error"
	  ConsistencyChecking	  "none"
	  ArrayBoundsChecking	  "none"
	  SignalInfNanChecking	  "none"
	  AlgebraicLoopMsg	  "warning"
	  ArtificialAlgebraicLoopMsg "warning"
	  CheckSSInitialOutputMsg on
	  CheckExecutionContextPreStartOutputMsg off
	  CheckExecutionContextRuntimeOutputMsg	off
	  SignalResolutionControl "TryResolveAllWithWarning"
	  BlockPriorityViolationMsg "warning"
	  MinStepSizeMsg	  "warning"
	  SolverPrmCheckMsg	  "none"
	  InheritedTsInSrcMsg	  "warning"
	  DiscreteInheritContinuousMsg "warning"
	  MultiTaskDSMMsg	  "warning"
	  MultiTaskRateTransMsg	  "error"
	  SingleTaskRateTransMsg  "none"
	  TasksWithSamePriorityMsg "warning"
	  CheckMatrixSingularityMsg "none"
	  IntegerOverflowMsg	  "warning"
	  Int32ToFloatConvMsg	  "warning"
	  ParameterDowncastMsg	  "error"
	  ParameterOverflowMsg	  "error"
	  ParameterPrecisionLossMsg "warning"
	  UnderSpecifiedDataTypeMsg "none"
	  UnnecessaryDatatypeConvMsg "none"
	  VectorMatrixConversionMsg "none"
	  InvalidFcnCallConnMsg	  "error"
	  FcnCallInpInsideContextMsg "Use local settings"
	  SignalLabelMismatchMsg  "none"
	  UnconnectedInputMsg	  "warning"
	  UnconnectedOutputMsg	  "warning"
	  UnconnectedLineMsg	  "warning"
	  SFcnCompatibilityMsg	  "none"
	  UniqueDataStoreMsg	  "none"
	  BusObjectLabelMismatch  "warning"
	  RootOutportRequireBusObject "warning"
	  AssertControl		  "UseLocalSettings"
	  EnableOverflowDetection off
	  ModelReferenceIOMsg	  "none"
	  ModelReferenceVersionMismatchMessage "none"
	  ModelReferenceIOMismatchMessage "none"
	  ModelReferenceCSMismatchMessage "none"
	  ModelReferenceSimTargetVerbose off
	  UnknownTsInhSupMsg	  "warning"
	  ModelReferenceDataLoggingMessage "warning"
	  ModelReferenceSymbolNameMessage "warning"
	  ModelReferenceExtraNoncontSigs "error"
	}
	Simulink.HardwareCC {
	  $ObjectID		  6
	  Version		  "1.1.0"
	  ProdBitPerChar	  8
	  ProdBitPerShort	  16
	  ProdBitPerInt		  32
	  ProdBitPerLong	  32
	  ProdIntDivRoundTo	  "Undefined"
	  ProdEndianess		  "Unspecified"
	  ProdWordSize		  32
	  ProdShiftRightIntArith  on
	  ProdHWDeviceType	  "32-bit Generic"
	  TargetBitPerChar	  8
	  TargetBitPerShort	  16
	  TargetBitPerInt	  32
	  TargetBitPerLong	  32
	  TargetShiftRightIntArith on
	  TargetIntDivRoundTo	  "Undefined"
	  TargetEndianess	  "Unspecified"
	  TargetWordSize	  32
	  TargetTypeEmulationWarnSuppressLevel 0
	  TargetPreprocMaxBitsSint 32
	  TargetPreprocMaxBitsUint 32
	  TargetHWDeviceType	  "Specified"
	  TargetUnknown		  on
	  ProdEqTarget		  on
	}
	Simulink.ModelReferenceCC {
	  $ObjectID		  7
	  Version		  "1.1.0"
	  UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
	  CheckModelReferenceTargetMessage "error"
	  ModelReferenceNumInstancesAllowed "Multi"
	  ModelReferencePassRootInputsByReference on
	  ModelReferenceMinAlgLoopOccurrences off
	}
	Simulink.RTWCC {
	  $BackupClass		  "Simulink.RTWCC"
	  $ObjectID		  8
	  Array {
	    Type		    "Cell"
	    Dimension		    1
	    Cell		    "IncludeHyperlinkInReport"
	    PropName		    "DisabledProps"
	  }
	  Version		  "1.1.0"
	  SystemTargetFile	  "grt.tlc"
	  GenCodeOnly		  off
	  MakeCommand		  "make_rtw"
	  TemplateMakefile	  "grt_default_tmf"
	  GenerateReport	  off
	  SaveLog		  off
	  RTWVerbose		  on
	  RetainRTWFile		  off
	  ProfileTLC		  off
	  TLCDebug		  off
	  TLCCoverage		  off
	  TLCAssert		  off
	  ProcessScriptMode	  "Default"
	  ConfigurationMode	  "Optimized"
	  ConfigAtBuild		  off
	  IncludeHyperlinkInReport off
	  LaunchReport		  off
	  TargetLang		  "C"
	  Array {
	    Type		    "Handle"
	    Dimension		    2
	    Simulink.CodeAppCC {
	      $ObjectID		      9
	      Array {
		Type			"Cell"
		Dimension		9
		Cell			"IgnoreCustomStorageClasses"
		Cell			"InsertBlockDesc"
		Cell			"SFDataObjDesc"
		Cell			"SimulinkDataObjDesc"
		Cell			"DefineNamingRule"
		Cell			"SignalNamingRule"
		Cell			"ParamNamingRule"
		Cell			"InlinedPrmAccess"
		Cell			"CustomSymbolStr"
		PropName		"DisabledProps"
	      }
	      Version		      "1.1.0"
	      ForceParamTrailComments off
	      GenerateComments	      on
	      IgnoreCustomStorageClasses on
	      IncHierarchyInIds	      off
	      MaxIdLength	      31
	      PreserveName	      off
	      PreserveNameWithParent  off
	      ShowEliminatedStatement off
	      IncAutoGenComments      off
	      SimulinkDataObjDesc     off
	      SFDataObjDesc	      off
	      IncDataTypeInIds	      off
	      PrefixModelToSubsysFcnNames on
	      CustomSymbolStr	      "$R$N$M"
	      MangleLength	      1
	      DefineNamingRule	      "None"
	      ParamNamingRule	      "None"
	      SignalNamingRule	      "None"
	      InsertBlockDesc	      off
	      SimulinkBlockComments   on
	      EnableCustomComments    off
	      InlinedPrmAccess	      "Literals"
	      ReqsInCode	      off
	    }
	    Simulink.GRTTargetCC {
	      $BackupClass	      "Simulink.TargetCC"
	      $ObjectID		      10
	      Array {
		Type			"Cell"
		Dimension		12
		Cell			"IncludeMdlTerminateFcn"
		Cell			"CombineOutputUpdateFcns"
		Cell			"SuppressErrorStatus"
		Cell			"ERTCustomFileBanners"
		Cell			"GenerateSampleERTMain"
		Cell			"MultiInstanceERTCode"
		Cell			"PurelyIntegerCode"
		Cell			"SupportNonFinite"
		Cell			"SupportComplex"
		Cell			"SupportAbsoluteTime"
		Cell			"SupportContinuousTime"
		Cell			"SupportNonInlinedSFcns"
		PropName		"DisabledProps"
	      }
	      Version		      "1.1.0"
	      TargetFcnLib	      "ansi_tfl_tmw.mat"
	      TargetLibSuffix	      ""
	      TargetPreCompLibLocation ""
	      GenFloatMathFcnCalls    "ANSI_C"
	      UtilityFuncGeneration   "Auto"
	      GenerateFullHeader      on
	      GenerateSampleERTMain   off
	      IsPILTarget	      off
	      ModelReferenceCompliant on
	      IncludeMdlTerminateFcn  on
	      CombineOutputUpdateFcns off
	      SuppressErrorStatus     off
	      IncludeFileDelimiter    "Auto"
	      ERTCustomFileBanners    off
	      SupportAbsoluteTime     on
	      LogVarNameModifier      "rt_"
	      MatFileLogging	      on
	      MultiInstanceERTCode    off
	      SupportNonFinite	      on
	      SupportComplex	      on
	      PurelyIntegerCode	      off
	      SupportContinuousTime   on
	      SupportNonInlinedSFcns  on
	      ExtMode		      off
	      ExtModeStaticAlloc      off
	      ExtModeTesting	      off
	      ExtModeStaticAllocSize  1000000
	      ExtModeTransport	      0
	      ExtModeMexFile	      "ext_comm"
	      RTWCAPISignals	      off
	      RTWCAPIParams	      off
	      RTWCAPIStates	      off
	      GenerateASAP2	      off
	    }
	    PropName		    "Components"
	  }
	}
	PropName		"Components"
      }
      Name		      "Configuration"
      SimulationMode	      "normal"
      CurrentDlgPage	      "Solver"
    }
    PropName		    "ConfigurationSets"
  }
  Simulink.ConfigSet {
    $PropName		    "ActiveConfigurationSet"
    $ObjectID		    1
  }
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "sfix(16)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "2^0"
      SampleTime	      "inf"
    }
    Block {
      BlockType		      Demux
      Outputs		      "4"
      DisplayOption	      "none"
      BusSelectionMode	      off
    }
    Block {
      BlockType		      Display
      Format		      "short"
      Decimation	      "10"
      Floating		      off
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Inport
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      Interpolate	      on
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      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		      "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		      Terminator
    }
  }
  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		    "sf_matrix"
    Location		    [364, 190, 1145, 727]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "Chart"
      Ports		      [2, 1]
      Position		      [250, 158, 375, 262]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "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"
	Block {
	  BlockType		  Inport
	  Name			  "data1"
	  Position		  [20, 101, 40, 119]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "data2"
	  Position		  [20, 136, 40, 154]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Demux
	  Name			  " Demux "
	  Ports			  [1, 1]
	  Position		  [270, 160, 320, 200]
	  Outputs		  "1"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  " SFunction "
	  Tag			  "Stateflow S-Function sf_matrix 1"
	  Ports			  [2, 2]
	  Position		  [180, 100, 230, 160]
	  FunctionName		  "sf_sfun"
	  PortCounts		  "[2 2]"
	  Port {
	    PortNumber		    2
	    Name		    "final_out"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	    ShowSigGenPortName	    on
	  }
	}
	Block {
	  BlockType		  Terminator
	  Name			  " Terminator "
	  Position		  [460, 171, 480, 189]
	}
	Block {
	  BlockType		  Outport
	  Name			  "final_out"
	  Position		  [460, 101, 480, 119]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  1
	  Points		  [0, 65]
	  DstBlock		  " Demux "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " Demux "
	  SrcPort		  1
	  DstBlock		  " Terminator "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "data1"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "data2"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  2
	}
	Line {
	  Name			  "final_out"
	  Labels		  [0, 0]
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "final_out"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Constant
      Name		      "Constant"
      Position		      [45, 245, 85, 285]
      Value		      "[3 2; 1 4]"
      VectorParams1D	      off
    }
    Block {
      BlockType		      Constant
      Name		      "Constant2"
      Position		      [45, 130, 85, 170]
      Value		      "[1 2;3 4]"
      VectorParams1D	      off
    }
    Block {
      BlockType		      Display
      Name		      "Display"
      Ports		      [1]
      Position		      [485, 184, 655, 236]
      Decimation	      "1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info"
      Ports		      []
      Position		      [495, 376, 625, 453]
      DropShadow	      on
      ShowName		      off
      FontName		      "Arial"
      FontSize		      12
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Double click\\nhere for\\ninformation on"
"\\nthis demonstration')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info"
	Location		[433, 446, 1147, 813]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"147"
	Annotation {
	  Name			  "Matrix Input/Output Demonstration"
	  Position		  [263, 22]
	  FontSize		  14
	  FontWeight		  "bold"
	}
	Annotation {
	  Name			  "The demo illustrates the ability of Statefl"
"ow to accept matrix input signals from Simulink and also\noutput matrix signa"
"ls to Simulink. In this particular example, we are multiplying a [2x2] matrix"
" with another\n[2x2] matrix to obtain a [2x2] output matrix. A flow chart is "
"used to perform the calculations which is \nalso the reason why the length of"
" the simulation time is only one timestep.\n\nThe graphical flowchart is equi"
"valent to writing the following nested-loop in the C language:\n\nfor(i=0;i<2"
";i++)\n   for(j=0;j<2;j++)\n       { \n         int final_out[2][2]; \n      "
"   final_out[i][j]=(data1[i][0]*data2[0][j])+(data1[i][1]+data2[1][j]);\n    "
"   }\n   \n\n'final_out' would be the output Simulink in this demo. \n"
	  Position		  [14, 46]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  FontName		  "Arial"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info1"
      Ports		      []
      Position		      [45, 381, 169, 460]
      DropShadow	      on
      ShowName		      off
      OpenFcn		      "simcad(bdroot);"
      FontName		      "Arial"
      FontSize		      12
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskDisplay	      "disp('Double click\\nhere for\\nSimulink\\State"
"flow\\n Help')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info1"
	Location		[128, 280, 487, 453]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Line {
      SrcBlock		      "Constant2"
      SrcPort		      1
      Points		      [50, 0; 0, 35]
      DstBlock		      "Chart"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Constant"
      SrcPort		      1
      Points		      [50, 0; 0, -30]
      DstBlock		      "Chart"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Chart"
      SrcPort		      1
      DstBlock		      "Display"
      DstPort		      1
    }
    Annotation {
      Name		      "Matrix Input/Output using a Flowchart\n"
      Position		      [354, 49]
      FontName		      "Arial"
      FontSize		      22
      FontWeight	      "bold"
    }
  }
}

# Finite State Machines
#
#    Stateflow Version 6.2 (R14SP2) dated Jan 21 2005, 03:46:19
#
#

Stateflow {

	machine {
		id                   		1
		name                 		"sf_matrix"
		created              		"22-Oct-2001 15:57:28"
		isLibrary            		0
		firstTarget          		18
		sfVersion            		62014000
		sfDemoChecksum       		[460737537 3660362035 1344946156 2722063424]
	}

	chart {
		id                                        		2
		name                                      		"Chart"
		windowPosition                            		[18.4 248 578.4 521.6]
		viewLimits                                		[96.602 563.045 0 423.231]
		zoomFactor                                		0.877
		screen                                    		[1 1 1600 1200 1.25]
		treeNode                                  		[0 3 0 0]
		firstTransition                           		9
		firstJunction                             		4
		viewObj                                   		2
		visible                                   		1
		machine                                   		1
		subviewS {
		}
		decomposition                             		CLUSTER_CHART
		firstData                                 		14
		chartFileNumber                           		1
		actionLanguage                            		1
	}

	state {
		id                  		3
		labelString         		"Equivalent C-Code:\n"
						"\n"
						"for(i=0;i<2;i++)\n"
						"   for(j=0;j<2;j++)\n"
						"       {\n"
						"         int final_out[2][2];\n"
						"         final_out[i][j]=(data1[i][0]*data2[0][j])+(data1["
						"i][1]+data2[1][j]);\n"
						"       }"
		position            		[278.6801 8.5 274 93.5]
		chart               		2
		treeNode            		[2 0 0 0]
		superState          		GROUPED
		isNoteBox           		1
		noteBox             		[0 0 0 1]
		subviewer           		2
		type                		GROUP_STATE
		decomposition       		CLUSTER_STATE
	}

	junction {
		id         		4
		position   		[123.5883 170.9093 7]
		chart      		2
		linkNode   		[2 0 5]
		subviewer  		2
		type       		CONNECTIVE_JUNCTION
	}

	junction {
		id         		5
		position   		[123.5883 226.7483 7]
		chart      		2
		linkNode   		[2 4 6]
		subviewer  		2
		type       		CONNECTIVE_JUNCTION
	}

	junction {
		id         		6
		position   		[123.5883 286.8062 7]
		chart      		2
		linkNode   		[2 5 7]
		subviewer  		2
		type       		CONNECTIVE_JUNCTION
	}

	junction {
		id         		7
		position   		[123.5883 336.7547 7]
		chart      		2
		linkNode   		[2 6 8]
		subviewer  		2
		type       		CONNECTIVE_JUNCTION
	}

	junction {
		id         		8
		position   		[151.146 370.8157 7]
		chart      		2
		linkNode   		[2 7 0]
		subviewer  		2
		type       		CONNECTIVE_JUNCTION
	}

	transition {
		id             		9
		labelString    		"{final_out[0][0]=(data1[0][0]*data2[0][0])+(data1[0][1]*da"
						"ta2[1][0]);}"
		labelPosition  		[115.983 132.179 345.098 16.143]
		fontSize       		12
		src {
			intersection		[0 0.3605 0.9327 0 106.9674 127.9095 0 0]
		}
		dst {
			id          		4
			intersection		[7 -0.3605 -0.9327 -1 121.0645 164.3801 0 0]
		}
		midPoint       		[112.7863 142.9635]
		chart          		2
		linkNode       		[2 0 10]
		dataLimits     		[106.967 121.064 127.91 164.38]
		subviewer      		2
		drawStyle      		SMART
		executionOrder 		1
	}

	transition {
		id             		10
		labelString    		"{final_out[0][1]=(data1[0][0]*data2[0][1])+(data1[0][1]*da"
						"ta2[1][1]);}"
		labelPosition  		[129.716 186.944 345.098 16.143]
		fontSize       		12
		src {
			id          		4
			intersection		[0 0 1 -1 123.5883 177.9093 0 0]
		}
		dst {
			id          		5
			intersection		[0 0 -1 -1 123.5883 219.7483 0 0]
		}
		midPoint       		[123.5883 195.4777]
		chart          		2
		linkNode       		[2 9 11]
		dataLimits     		[121.188 125.988 177.909 219.748]
		subviewer      		2
		drawStyle      		SMART
		executionOrder 		1
	}

	transition {
		id             		11
		labelString    		"{final_out[1][0]=(data1[1][0]*data2[0][0])+(data1[1][1]*da"
						"ta2[1][0]);}"
		labelPosition  		[126.639 241.171 345.098 16.143]
		fontSize       		12
		src {
			id          		5
			intersection		[0 0 1 -1 123.5883 233.7483 0 0]
		}
		dst {
			id          		6
			intersection		[0 0 -1 -1 123.5883 279.8062 0 0]
		}
		midPoint       		[123.5883 253.5178]
		chart          		2
		linkNode       		[2 10 12]
		dataLimits     		[121.188 125.988 233.748 279.806]
		subviewer      		2
		drawStyle      		SMART
		executionOrder 		1
	}

	transition {
		id             		12
		labelString    		"{final_out[1][1]=(data1[1][0]*data2[0][1])+(data1[1][1]*da"
						"ta2[1][1]);}"
		labelPosition  		[130.4 302.355 345.098 16.143]
		fontSize       		12
		src {
			id          		6
			intersection		[0 0 1 -1 123.5883 293.8062 0 0]
		}
		dst {
			id          		7
			intersection		[0 0 -1 -1 123.5883 329.7547 0 0]
		}
		midPoint       		[123.5883 308.3012]
		chart          		2
		linkNode       		[2 11 13]
		dataLimits     		[121.188 125.988 293.806 329.755]
		subviewer      		2
		drawStyle      		SMART
		executionOrder 		1
	}

	transition {
		id             		13
		labelPosition  		[131.85 356.385 7.716 16.143]
		fontSize       		12
		src {
			id          		7
			intersection		[0 0.3886 0.9214 -1 126.3085 343.2045 0 0]
		}
		dst {
			id          		8
			intersection		[0 -0.82 -0.5724 -1 145.406 366.8089 0 0]
		}
		midPoint       		[132.7993 357.4612]
		chart          		2
		linkNode       		[2 12 0]
		dataLimits     		[126.309 145.406 343.204 366.809]
		stampAngle     		0.2811
		subviewer      		2
		drawStyle      		SMART
		slide {
			sticky        		SRC_STICK
		}
		executionOrder 		1
	}

	data {
		id                            		14
		name                          		"final_out"
		linkNode                      		[2 0 15]
		scope                         		OUTPUT_DATA
		machine                       		1
		dataType                      		"double"
		fixptType {
			bias    		0
			slope   		1
			exponent		0
			baseType		SF_UINT8_TYPE
			lock    		0
		}
		dlgFixptMode                  		0
		props {
			range {
				minimum		""
				maximum		""
			}
			array {
				size      		"[2 2]"
			}
		}
	}

	data {
		id                            		15
		name                          		"data1"
		linkNode                      		[2 14 16]
		scope                         		INPUT_DATA
		machine                       		1
		dataType                      		"double"
		fixptType {
			bias    		0
			slope   		1
			exponent		0
			baseType		SF_UINT8_TYPE
			lock    		0
		}
		dlgFixptMode                  		0
		props {
			range {
				minimum		""
				maximum		""
			}
			array {
				size      		"[2 2]"
			}
		}
	}

	data {
		id                            		16
		name                          		"data2"
		linkNode                      		[2 15 0]
		scope                         		INPUT_DATA
		machine                       		1
		dataType                      		"double"
		fixptType {
			bias    		0
			slope   		1
			exponent		0
			baseType		SF_UINT8_TYPE
			lock    		0
		}
		dlgFixptMode                  		0
		props {
			range {
				minimum		""
				maximum		""
			}
			array {
				size      		"[2 2]"
			}
		}
	}

	instance {
		id     		17
		name   		"Chart"
		machine		1
		chart  		2
	}

	target {
		id                        		18
		name                      		"sfun"
		description               		"Default Simulink S-Function Target."
		codeFlags                 		" debug=1 overflow=1 echo=1"
		machine                   		1
		linkNode                  		[1 0 0]
	}
}
