﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="1.0.8348.30405"?>
<worksheet xmlns="http://smath.info/schemas/worksheet/1.0">
  <settings ppi="120">
    <identity>
      <id>3d096560-c630-4b71-8b1e-d4368ccbfac9</id>
      <revision>28</revision>
    </identity>
    <metadata lang="eng">
      <author>NDTM Amarasekera</author>
    </metadata>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <trailingZeros>false</trailingZeros>
      <significantDigitsMode>false</significantDigitsMode>
      <roundingMode>1</roundingMode>
      <approximateEqualAccuracy>0</approximateEqualAccuracy>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="false" viewMode="2" printGrid="false" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="9" orientation="Portrait" width="827" height="1169" />
      <margins left="50" right="30" top="49" bottom="49" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9">&amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependencies>
      <assembly name="SMath Studio Desktop" version="1.0.8348.30405" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="MathRegion" version="1.11.8348.30405" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="SpecialFunctions" version="1.12.8348.30405" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="TextRegion" version="1.11.8348.30405" guid="485d28c5-349a-48b6-93be-12a35a1c1e39" />
    </dependencies>
  </settings>
  <regions type="content">
    <region left="18" top="9" width="234" height="24" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">4</e>
          <e type="function" args="1">appVersion</e>
        </input>
        <result action="numeric">
          <e type="operand" style="string">1.0.8348.30405</e>
        </result>
      </math>
    </region>
    <region left="18" top="36" width="73" height="22" color="#000000" fontSize="9">
      <text lang="eng" width="72" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p style="font-weight: bold; text-decoration: underline;">METHOD A</p>
        </content>
      </text>
    </region>
    <region left="333" top="36" width="44" height="22" color="#000000" fontSize="9">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p style="text-decoration: underline; font-weight: bold;">DATA</p>
        </content>
      </text>
    </region>
    <region left="9" top="63" width="295" height="160" border="true" color="#000000" bgColor="#e6ffe6" fontSize="9">
      <math>
        <description active="true" position="Top" lang="eng" width="287">
          <content>
            <p>Program 1 to find the last cordinates of a Matrix or Nested Matrix</p>
          </content>
        </description>
        <input>
          <e type="operand">M</e>
          <e type="function" args="1">TEST1</e>
          <e type="operand">j</e>
          <e type="operand">1</e>
          <e type="operand">M</e>
          <e type="function" args="1">rows</e>
          <e type="function" args="2">range</e>
          <e type="operand">tmp</e>
          <e type="operand">M</e>
          <e type="operand">j</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">B#</e>
          <e type="operand">j</e>
          <e type="function" args="2">el</e>
          <e type="operand">tmp</e>
          <e type="operand">tmp</e>
          <e type="function" args="1">rows</e>
          <e type="function" args="2">row</e>
          <e type="operator" args="2">:</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="function" args="3">for</e>
          <e type="operand">B#</e>
          <e type="function" args="1">rows</e>
          <e type="operand">2</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">C#</e>
          <e type="operand">B#</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">B#</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="function" args="2">stack</e>
          <e type="operator" args="2">:</e>
          <e type="operand">C#</e>
          <e type="operand">B#</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="function" args="3">if</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="333" top="63" width="174" height="96" color="#000000" bgColor="#ffff00" fontSize="9">
      <math>
        <description active="true" position="Top" lang="eng">
          <content>
            <p>Cordinate points (x,y)</p>
          </content>
        </description>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="operand">0.3547</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="operand">2</e>
          <e type="function" args="6">mat</e>
          <e type="operand">17</e>
          <e type="operand">9</e>
          <e type="operand">19</e>
          <e type="operand">9</e>
          <e type="operand">20.7171</e>
          <e type="operand">9</e>
          <e type="operand">3</e>
          <e type="operand">2</e>
          <e type="function" args="8">mat</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operand" style="unit">m</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="333" top="189" width="210" height="41" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="function" args="1">TEST1</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">0.3547</e>
          <e type="operand">1</e>
          <e type="operand">20.7171</e>
          <e type="operand">9</e>
          <e type="operand">2</e>
          <e type="operand">2</e>
          <e type="function" args="6">mat</e>
        </result>
      </math>
    </region>
    <region left="576" top="198" width="68" height="22" color="#000000" fontSize="9">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p>Result  A1</p>
        </content>
      </text>
    </region>
    <region left="333" top="243" width="228" height="35" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">mat</e>
          <e type="function" args="1">TEST1</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">0.3547</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
    <region left="576" top="243" width="164" height="36" color="#000000" fontSize="9" isBreakable="false">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p>Result  A2 <span style="color: #ff0000;">(Have to use subscripted Matrix as input)</span></p>
        </content>
      </text>
    </region>
    <region left="333" top="288" width="235" height="35" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">mat</e>
          <e type="function" args="1">TEST1</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">20.7171</e>
          <e type="operand">9</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
    <region left="576" top="288" width="164" height="36" color="#000000" fontSize="9" isBreakable="false">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p>Result  A3 <span style="color: #ff0000;">(Have to use subscripted Matrix as input)</span></p>
        </content>
      </text>
    </region>
    <region left="9" top="297" width="150" height="31" color="#000000" fontSize="9">
      <math error="69">
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="function" args="1">TEST1</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">#</e>
        </result>
      </math>
    </region>
    <region left="171" top="297" width="150" height="31" color="#000000" fontSize="9">
      <math error="69">
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="function" args="1">TEST1</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">#</e>
        </result>
      </math>
    </region>
    <region left="9" top="333" width="478" height="22" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">lastError</e>
        </input>
        <result action="numeric">
          <e type="operand" style="string">Argument cannot be scalar; must be matrix or vector.</e>
        </result>
      </math>
    </region>
    <region left="9" top="360" width="715" height="22" color="#000000" fontSize="9">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p>---------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
        </content>
      </text>
    </region>
    <region left="9" top="378" width="72" height="22" color="#000000" fontSize="9" isBreakable="false">
      <text lang="eng" width="72" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p style="font-weight: bold; text-decoration: underline;">METHOD B</p>
        </content>
      </text>
    </region>
    <region left="9" top="405" width="204" height="29" border="true" color="#000000" bgColor="#ffeadf" fontSize="9">
      <math>
        <description active="true" position="Top" lang="eng">
          <content>
            <p>Program 2</p>
          </content>
        </description>
        <input>
          <e type="operand">M</e>
          <e type="function" args="1">TEST2</e>
          <e type="operand">M</e>
          <e type="operand">M</e>
          <e type="function" args="1">rows</e>
          <e type="function" args="2">row</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="288" top="414" width="225" height="46" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="function" args="1">TEST2</e>
          <e type="function" args="1">vectorize</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">0.3547</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
          <e type="operand">20.7171</e>
          <e type="operand">9</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
    <region left="540" top="423" width="174" height="36" color="#000000" fontSize="9" isBreakable="false">
      <text lang="eng" width="161" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p>Result  B1 <span style="color: #ff0000;">(Result is a nested matrix)</span></p>
        </content>
      </text>
    </region>
    <region left="9" top="468" width="85" height="22" color="#ff0000" fontSize="9">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p style="text-decoration: underline; color: #ff0000;">Wrong Result</p>
        </content>
      </text>
    </region>
    <region left="288" top="468" width="208" height="41" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="function" args="1">TEST2</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="function" args="1">vectorize</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">0.3547</e>
          <e type="operand">20.7171</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
    <region left="540" top="468" width="207" height="36" color="#000000" fontSize="9" isBreakable="false">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p>Result  B2 <span style="color: #ff0000;">(Have to use subscripted matrix as input)</span></p>
        </content>
      </text>
    </region>
    <region left="9" top="486" width="237" height="61" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="function" args="1">TEST2</e>
        </input>
        <result action="numeric">
          <e type="operand">17</e>
          <e type="operand" style="unit">m</e>
          <e type="operator" args="2">*</e>
          <e type="operand">9</e>
          <e type="operand" style="unit">m</e>
          <e type="operator" args="2">*</e>
          <e type="operand">19</e>
          <e type="operand" style="unit">m</e>
          <e type="operator" args="2">*</e>
          <e type="operand">9</e>
          <e type="operand" style="unit">m</e>
          <e type="operator" args="2">*</e>
          <e type="operand">20.7171</e>
          <e type="operand" style="unit">m</e>
          <e type="operator" args="2">*</e>
          <e type="operand">9</e>
          <e type="operand" style="unit">m</e>
          <e type="operator" args="2">*</e>
          <e type="operand">3</e>
          <e type="operand">2</e>
          <e type="function" args="8">mat</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">mat</e>
        </result>
      </math>
    </region>
    <region left="540" top="504" width="207" height="36" color="#000000" fontSize="9" isBreakable="false">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p>Result  B3 <span style="color: #ff0000;">(Have to use subscripted Matrix as input)</span></p>
        </content>
      </text>
    </region>
    <region left="288" top="513" width="213" height="31" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="function" args="1">TEST2</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">0.3547</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
    <region left="288" top="549" width="220" height="31" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="function" args="1">TEST2</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">20.7171</e>
          <e type="operand">9</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
    <region left="540" top="549" width="207" height="36" color="#000000" fontSize="9" isBreakable="false">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p>Result  B4 <span style="color: #ff0000;">(Have to use subscripted Matrix as input)</span></p>
        </content>
      </text>
    </region>
    <region left="0" top="594" width="351" height="24" color="#000000" fontSize="10">
      <text lang="eng" fontFamily="Consolas" fontSize="10">
        <content>
          <p>Last row of a column vector of nested matrices</p>
        </content>
      </text>
    </region>
    <region left="0" top="630" width="284" height="104" color="#000000" fontSize="10">
      <math roundingMode="0">
        <input>
          <e type="operand">M</e>
          <e type="function" args="1">TEST</e>
          <e type="operand">M</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="function" args="1">stack</e>
          <e type="function" args="1">length</e>
          <e type="operand">1</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">M</e>
          <e type="operand">M</e>
          <e type="function" args="1">rows</e>
          <e type="function" args="2">row</e>
          <e type="operand">M</e>
          <e type="operand">M</e>
          <e type="function" args="1">rows</e>
          <e type="function" args="2">row</e>
          <e type="function" args="1">vectorize</e>
          <e type="function" args="3">if</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="378" top="630" width="218" height="46" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="function" args="1">TEST</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">0.3547</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
          <e type="operand">20.7171</e>
          <e type="operand">9</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
    <region left="378" top="702" width="206" height="31" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="function" args="1">TEST</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">0.3547</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
    <region left="378" top="738" width="213" height="31" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">TC_hoz</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="function" args="1">TEST</e>
        </input>
        <contract>
          <e type="operand" style="unit">m</e>
        </contract>
        <result action="numeric">
          <e type="operand">20.7171</e>
          <e type="operand">9</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="function" args="4">mat</e>
        </result>
      </math>
    </region>
  </regions>
</worksheet>