﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="0.99.6622.8829"?>
<regions xmlns="http://smath.info/schemas/worksheet/1.0">
  <settings dpi="96">
    <identity>
      <id>8756e0b0-4786-49cc-b282-8d7a293f7675</id>
      <revision>122</revision>
    </identity>
    <metadata lang="eng">
      <title>Functions for line intersections</title>
      <author>Marco Bernacca</author>
    </metadata>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="true" viewMode="0" printGrid="false" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="9" orientation="Portrait" width="827" height="1169" />
      <margins left="39" right="30" top="39" bottom="59" />
      <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="0.99.6622.8829" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Mathcad File Access Functions" version="1.0.6520.39061" guid="02a1c2c5-590e-46bb-bcf6-c87856a8b14b" />
      <assembly name="Math Region" version="0.99.6622.8829" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="Special Functions" version="1.11.6622.8831" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="Text Region" version="1.10.6622.8831" guid="485d28c5-349a-48b6-93be-12a35a1c1e39" />
      <assembly name="Plot Region" version="1.10.6622.8832" guid="c451c2b5-798b-4f08-b9ec-b90963d1ddaa" />
    </dependencies>
    <mode debug="true" />
  </settings>
  <region id="0" left="0" top="0" width="729" height="88" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p>These functions have been written to implement in Smath some features that are natively provided by either Scilab or Matlab in order to make available in Smath a function originally written in Matlab to find intersections between lines.The function in subject is  P = InterX(L1, L2), written by NS. See below link:https://de.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections</p>
    </text>
  </region>
  <region id="1" left="9" top="108" width="657" height="72" border="true" color="#000000" bgColor="#f9fed8" fontSize="10">
    <text lang="eng">
      <p>Function mdiff(V)Input: a vector (either a row or a column)Output: a vector of the same nature of input (a row or a column) containing the                 differences V(i+1)-V(i). Number of output elements are lenght(V)-1.</p>
    </text>
  </region>
  <region id="2" left="774" top="153" width="421" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p>Guess that the submatrix version must to be faster</p>
    </text>
  </region>
  <region id="3" left="774" top="180" width="496" height="98" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" evaluate="false" trailingZeros="true">
      <description active="false" position="Top" lang="eng">
        <p>Function mdiff(V)Input: a vector (either a row or a column)Output: a vector of the same nature of input (a row or a column)                  containing the differences V(i+1)-V(i).                   Number of output elements are lenght(V).</p>
      </description>
      <input>
        <e type="operand">V</e>
        <e type="function" args="1">mdiff</e>
        <e type="operand">R</e>
        <e type="operand">V</e>
        <e type="function" args="1">rows</e>
        <e type="operand">V</e>
        <e type="function" args="1">rows</e>
        <e type="operand">1</e>
        <e type="operator" args="2">&gt;</e>
        <e type="bracket">(</e>
        <e type="operator" args="2">-</e>
        <e type="operand">V</e>
        <e type="function" args="1">cols</e>
        <e type="operand">V</e>
        <e type="function" args="1">cols</e>
        <e type="operand">1</e>
        <e type="operator" args="2">&gt;</e>
        <e type="bracket">(</e>
        <e type="operator" args="2">-</e>
        <e type="function" args="2">matrix</e>
        <e type="operator" args="2">:</e>
        <e type="operand">ii</e>
        <e type="operand">1</e>
        <e type="operand">R</e>
        <e type="function" args="1">length</e>
        <e type="function" args="2">range</e>
        <e type="operand">R</e>
        <e type="operand">ii</e>
        <e type="function" args="2">el</e>
        <e type="operand">V</e>
        <e type="operand">ii</e>
        <e type="operand">1</e>
        <e type="operator" args="2">+</e>
        <e type="function" args="2">el</e>
        <e type="operand">V</e>
        <e type="operand">ii</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">-</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="3">for</e>
        <e type="operand">R</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="4" left="9" top="189" width="578" height="84" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">V</e>
        <e type="function" args="1">mdiff</e>
        <e type="operand">V</e>
        <e type="function" args="1">rows</e>
        <e type="operand">1</e>
        <e type="operator" args="2">&gt;</e>
        <e type="operand">V</e>
        <e type="operand">0</e>
        <e type="function" args="2">stack</e>
        <e type="operand">0</e>
        <e type="operand">V</e>
        <e type="function" args="2">stack</e>
        <e type="operator" args="2">-</e>
        <e type="operand">2</e>
        <e type="operand">V</e>
        <e type="function" args="1">rows</e>
        <e type="operand">1</e>
        <e type="operand">1</e>
        <e type="function" args="5">submatrix</e>
        <e type="operand">V</e>
        <e type="operand">0</e>
        <e type="function" args="2">augment</e>
        <e type="operand">0</e>
        <e type="operand">V</e>
        <e type="function" args="2">augment</e>
        <e type="operator" args="2">-</e>
        <e type="operand">1</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="operand">V</e>
        <e type="function" args="1">cols</e>
        <e type="function" args="5">submatrix</e>
        <e type="function" args="3">if</e>
        <e type="function" args="1">eval</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="5" left="468" top="279" width="68" height="99" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">z2</e>
        <e type="operand">4</e>
        <e type="operand">2</e>
        <e type="operand">7</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="operand">5</e>
        <e type="operand">1</e>
        <e type="function" args="7">mat</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="6" left="549" top="279" width="185" height="81" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z2</e>
        <e type="function" args="1">mdiff</e>
      </input>
      <result action="numeric">
        <e type="operand">2.0000</e>
        <e type="operator" args="1">-</e>
        <e type="operand">5.0000</e>
        <e type="operand">4.0000</e>
        <e type="operator" args="1">-</e>
        <e type="operand">2.0000</e>
        <e type="operator" args="1">-</e>
        <e type="operand">4</e>
        <e type="operand">1</e>
        <e type="function" args="6">mat</e>
      </result>
    </math>
  </region>
  <region id="7" left="306" top="306" width="138" height="27" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">z1</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="operand">5</e>
        <e type="operand">8</e>
        <e type="operand">9</e>
        <e type="operand">4</e>
        <e type="operand">1</e>
        <e type="operand">6</e>
        <e type="function" args="8">mat</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="8" left="774" top="306" width="298" height="39" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">V</e>
        <e type="operand">2</e>
        <e type="operand">V</e>
        <e type="function" args="1">length</e>
        <e type="function" args="2">range</e>
        <e type="function" args="2">el</e>
        <e type="operand">V</e>
        <e type="operand">1</e>
        <e type="operand">V</e>
        <e type="function" args="1">length</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">-</e>
      </input>
    </math>
  </region>
  <region id="9" left="99" top="315" width="86" height="24" color="#000000" bgColor="#80ff80" fontSize="10">
    <text lang="eng">
      <p>Examples:</p>
    </text>
  </region>
  <region id="10" left="261" top="333" width="401" height="27" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z1</e>
        <e type="function" args="1">mdiff</e>
      </input>
      <result action="numeric">
        <e type="operand">2.0000</e>
        <e type="operand">2.0000</e>
        <e type="operand">3.0000</e>
        <e type="operand">1.0000</e>
        <e type="operand">5.0000</e>
        <e type="operator" args="1">-</e>
        <e type="operand">1</e>
        <e type="operand">5</e>
        <e type="function" args="7">mat</e>
      </result>
    </math>
  </region>
  <region id="11" left="0" top="387" width="746" height="72" border="true" color="#000000" bgColor="#f9fed8" fontSize="10">
    <text lang="eng">
      <p>Function index(x; cond)Input: x: a vector (row or column). cond: expression evaluating to an array of T/F values.Output: a vector of same nature of input array whose components are those corresponding                to a TRUE value for the given condition. </p>
    </text>
  </region>
  <region id="12" left="774" top="441" width="355" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p>Index isn't used in this version of InterX</p>
    </text>
  </region>
  <region id="13" left="0" top="468" width="314" height="240" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <description active="false" position="Top" lang="eng">
        <p>Function index(x; cond)Input: x: a vector (row or column). cond: expression evaluating to an array of T/F values.Output: a vector of same nature of input array whose components are those corresponding                to a TRUE value for the given condition. </p>
      </description>
      <input>
        <e type="operand">V</e>
        <e type="operand">cond</e>
        <e type="function" args="2">index</e>
        <e type="operand">j</e>
        <e type="operand">0</e>
        <e type="operator" args="2">:</e>
        <e type="operand">R</e>
        <e type="operand">0</e>
        <e type="operator" args="2">:</e>
        <e type="operand">c</e>
        <e type="operand">cond</e>
        <e type="function" args="1">vectorize</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="function" args="5">mat</e>
        <e type="operand">i</e>
        <e type="operand">1</e>
        <e type="operand">V</e>
        <e type="function" args="1">length</e>
        <e type="function" args="2">range</e>
        <e type="operand">c</e>
        <e type="operand">i</e>
        <e type="function" args="2">el</e>
        <e type="operand">j</e>
        <e type="operand">j</e>
        <e type="operand">1</e>
        <e type="operator" args="2">+</e>
        <e type="operator" args="2">:</e>
        <e type="operand">R</e>
        <e type="operand">j</e>
        <e type="function" args="2">el</e>
        <e type="operand">V</e>
        <e type="operand">i</e>
        <e type="function" args="2">el</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="operand">continue</e>
        <e type="function" args="3">if</e>
        <e type="function" args="3">for</e>
        <e type="operand">V</e>
        <e type="function" args="1">rows</e>
        <e type="operand">1</e>
        <e type="operator" args="2">&gt;</e>
        <e type="operand">R</e>
        <e type="operand">R</e>
        <e type="function" args="1">transpose</e>
        <e type="function" args="3">if</e>
        <e type="function" args="1">eval</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="14" left="423" top="477" width="86" height="24" color="#000000" bgColor="#80ff80" fontSize="10">
    <text lang="eng">
      <p>Examples:</p>
    </text>
  </region>
  <region id="15" left="765" top="486" width="202" height="137" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">V</e>
        <e type="function" args="1">rows</e>
        <e type="operand">1</e>
        <e type="operator" args="2">&gt;</e>
        <e type="operand">V</e>
        <e type="operand">cond</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="1">mwfind</e>
        <e type="operand">2</e>
        <e type="function" args="2">el</e>
        <e type="function" args="2">el</e>
        <e type="operand">V</e>
        <e type="operand">cond</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="1">mwfind</e>
        <e type="operand">2</e>
        <e type="function" args="2">el</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">transpose</e>
        <e type="function" args="3">if</e>
        <e type="function" args="1">eval</e>
      </input>
    </math>
  </region>
  <region id="16" left="423" top="504" width="334" height="27" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z1</e>
        <e type="operand">z1</e>
        <e type="operand">4</e>
        <e type="operator" args="2">&gt;</e>
        <e type="function" args="2">index</e>
      </input>
      <result action="numeric">
        <e type="operand">5.0000</e>
        <e type="operand">8.0000</e>
        <e type="operand">9.0000</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="function" args="5">mat</e>
      </result>
    </math>
  </region>
  <region id="17" left="423" top="540" width="281" height="81" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z2</e>
        <e type="operand">z1</e>
        <e type="function" args="1">mdiff</e>
        <e type="operand">0</e>
        <e type="operator" args="2">&gt;</e>
        <e type="function" args="2">index</e>
      </input>
      <result action="numeric">
        <e type="operand">4.0000</e>
        <e type="operand">2.0000</e>
        <e type="operand">7.0000</e>
        <e type="operand">3.0000</e>
        <e type="operand">4</e>
        <e type="operand">1</e>
        <e type="function" args="6">mat</e>
      </result>
    </math>
  </region>
  <region id="18" left="0" top="729" width="331" height="40" border="true" color="#000000" bgColor="#f9fed8" fontSize="10">
    <text lang="eng">
      <p>Function plotG(x; y; char; size; color)Thanks to Omorr!! :-)</p>
    </text>
  </region>
  <region id="19" left="9" top="783" width="699" height="98" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="5">plotG</e>
        <e type="operand">plot</e>
        <e type="operand">0</e>
        <e type="operand">5</e>
        <e type="function" args="2">matrix</e>
        <e type="operator" args="2">:</e>
        <e type="operand">i</e>
        <e type="operand">1</e>
        <e type="operand">x</e>
        <e type="function" args="1">length</e>
        <e type="function" args="2">range</e>
        <e type="operand">plot</e>
        <e type="operand">plot</e>
        <e type="operand">x</e>
        <e type="operand">i</e>
        <e type="function" args="2">el</e>
        <e type="operand">y</e>
        <e type="operand">i</e>
        <e type="function" args="2">el</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="5">augment</e>
        <e type="function" args="2">stack</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="3">for</e>
        <e type="operand">plot</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="20" left="774" top="783" width="323" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p>Notice the use of matrix(0,5) as NULL.</p>
    </text>
  </region>
  <region id="21" left="765" top="828" width="388" height="184" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" evaluate="false" trailingZeros="true">
      <input>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="5">plotG</e>
        <e type="operand">i</e>
        <e type="operand">1</e>
        <e type="operand">x</e>
        <e type="function" args="1">length</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">i</e>
        <e type="operand">1</e>
        <e type="function" args="3">el</e>
        <e type="operand">x</e>
        <e type="operand">i</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">i</e>
        <e type="operand">2</e>
        <e type="function" args="3">el</e>
        <e type="operand">y</e>
        <e type="operand">i</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">i</e>
        <e type="operand">3</e>
        <e type="function" args="3">el</e>
        <e type="operand">char</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">i</e>
        <e type="operand">4</e>
        <e type="function" args="3">el</e>
        <e type="operand">size</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">i</e>
        <e type="operand">5</e>
        <e type="function" args="3">el</e>
        <e type="operand">color</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">7</e>
        <e type="operand">1</e>
        <e type="function" args="9">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="22" left="1170" top="828" width="495" height="171" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" evaluate="false" trailingZeros="true">
      <input>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="5">plotG</e>
        <e type="operand">template</e>
        <e type="operand">0</e>
        <e type="operand">0</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="operand">1</e>
        <e type="operand">5</e>
        <e type="function" args="7">mat</e>
        <e type="operator" args="2">:</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">x</e>
        <e type="function" args="1">length</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">c</e>
        <e type="operand">1</e>
        <e type="operand">5</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">r</e>
        <e type="operand">c</e>
        <e type="function" args="3">el</e>
        <e type="operand">template</e>
        <e type="operand">1</e>
        <e type="operand">c</e>
        <e type="function" args="3">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="function" args="3">el</e>
        <e type="operand">x</e>
        <e type="operand">r</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">r</e>
        <e type="operand">2</e>
        <e type="function" args="3">el</e>
        <e type="operand">y</e>
        <e type="operand">r</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">plot</e>
        <e type="operand">7</e>
        <e type="operand">1</e>
        <e type="function" args="9">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="23" left="9" top="900" width="626" height="82" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">xy</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="4">plotG</e>
        <e type="operand">xy</e>
        <e type="function" args="1">cols</e>
        <e type="operand">1</e>
        <e type="operator" args="2">&gt;</e>
        <e type="operand">xy</e>
        <e type="operand">1</e>
        <e type="function" args="2">col</e>
        <e type="operand">xy</e>
        <e type="operand">2</e>
        <e type="function" args="2">col</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="5">plotG</e>
        <e type="operand">xy</e>
        <e type="function" args="1">Re</e>
        <e type="operand">xy</e>
        <e type="function" args="1">Im</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="5">plotG</e>
        <e type="function" args="3">if</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="24" left="765" top="1017" width="610" height="85" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" evaluate="false" trailingZeros="true">
      <input>
        <e type="operand">xy</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="4">plotG</e>
        <e type="operand">xy</e>
        <e type="function" args="1">cols</e>
        <e type="operand">1</e>
        <e type="operator" args="2">&gt;</e>
        <e type="operand">xy</e>
        <e type="operand">1</e>
        <e type="function" args="2">col</e>
        <e type="operand">xy</e>
        <e type="operand">2</e>
        <e type="function" args="2">col</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="5">plotG</e>
        <e type="operand">xy</e>
        <e type="function" args="1">Re</e>
        <e type="operand">xy</e>
        <e type="function" args="1">Im</e>
        <e type="operand">char</e>
        <e type="operand">size</e>
        <e type="operand">color</e>
        <e type="function" args="5">plotG</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 id="25" left="9" top="1053" width="594" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p>"Scalar" (loop based) version of mwfind. Can be improved using findrow?</p>
    </text>
  </region>
  <region id="26" left="45" top="1125" width="424" height="409" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="7" trailingZeros="true">
      <input>
        <e type="operand">M</e>
        <e type="function" args="1">find</e>
        <e type="operand">rm</e>
        <e type="operand">M</e>
        <e type="function" args="1">rows</e>
        <e type="operator" args="2">:</e>
        <e type="operand">cm</e>
        <e type="operand">M</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">lm</e>
        <e type="operand">cm</e>
        <e type="operand">rm</e>
        <e type="operator" args="2">*</e>
        <e type="operator" args="2">:</e>
        <e type="operand">gtzM</e>
        <e type="operand">M</e>
        <e type="operand">0</e>
        <e type="operator" args="2">≠</e>
        <e type="function" args="1">vectorize</e>
        <e type="operator" args="2">:</e>
        <e type="operand">nzM</e>
        <e type="operand">gtzM</e>
        <e type="bracket">(</e>
        <e type="function" args="1">sum</e>
        <e type="operator" args="2">:</e>
        <e type="operand">R</e>
        <e type="operand">nzM</e>
        <e type="operand">1</e>
        <e type="function" args="2">matrix</e>
        <e type="operator" args="2">:</e>
        <e type="operand">C</e>
        <e type="operand">R</e>
        <e type="operator" args="2">:</e>
        <e type="operand">V</e>
        <e type="operand">R</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="function" args="5">mat</e>
        <e type="operand">jj</e>
        <e type="operand">1</e>
        <e type="operator" args="2">:</e>
        <e type="operand">ii</e>
        <e type="operand">1</e>
        <e type="operand">lm</e>
        <e type="function" args="2">range</e>
        <e type="operand">gtzM</e>
        <e type="operand">ii</e>
        <e type="function" args="2">el</e>
        <e type="operand">t</e>
        <e type="operand">ii</e>
        <e type="operand">cm</e>
        <e type="function" args="2">mod</e>
        <e type="operator" args="2">:</e>
        <e type="operand">R</e>
        <e type="operand">jj</e>
        <e type="function" args="2">el</e>
        <e type="operand">ii</e>
        <e type="operand">cm</e>
        <e type="operator" args="2">/</e>
        <e type="function" args="1">Ceil</e>
        <e type="operator" args="2">:</e>
        <e type="operand">C</e>
        <e type="operand">jj</e>
        <e type="function" args="2">el</e>
        <e type="operand">t</e>
        <e type="operand">0</e>
        <e type="operator" args="2">≡</e>
        <e type="operand">cm</e>
        <e type="operand">t</e>
        <e type="function" args="3">if</e>
        <e type="operator" args="2">:</e>
        <e type="operand">V</e>
        <e type="operand">jj</e>
        <e type="function" args="2">el</e>
        <e type="operand">M</e>
        <e type="operand">ii</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="function" args="5">mat</e>
        <e type="operand">jj</e>
        <e type="operand">jj</e>
        <e type="operand">1</e>
        <e type="operator" args="2">+</e>
        <e type="operator" args="2">:</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operand">0</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="function" args="3">for</e>
        <e type="operand">R</e>
        <e type="operand">C</e>
        <e type="operand">V</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">mat</e>
        <e type="operand">9</e>
        <e type="operand">1</e>
        <e type="function" args="11">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="27" left="0" top="1629" width="731" height="98" border="true" color="#000000" bgColor="#f9fed8" fontSize="9">
    <text lang="eng">
      <p>Function map(x; y; fun(2))Input: x, y: vectors or matrices with compatible sizes. fun: a function of 2 argumensOutput: vector or matrix whose elements are fun(el(x);el(y))Apply a given function to corresponding elements of compatible arrays.For info on the Matlab concept of "arrays of compatible sizes" please refer to:https://it.mathworks.com/help/matlab/matlab_prog/compatible-array-sizes-for-basic-operations.html</p>
    </text>
  </region>
  <region id="28" left="765" top="1710" width="660" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p>Complete version, with error checking, but the other it's just a little faster.</p>
    </text>
  </region>
  <region id="29" left="765" top="1737" width="528" height="396" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" evaluate="false" trailingZeros="true">
      <input>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="operand">2</e>
        <e type="function" args="1">fun</e>
        <e type="function" args="3">map</e>
        <e type="operand">xh</e>
        <e type="operand">x</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">xv</e>
        <e type="operand">x</e>
        <e type="function" args="1">rows</e>
        <e type="operator" args="2">:</e>
        <e type="operand">yh</e>
        <e type="operand">y</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">yv</e>
        <e type="operand">y</e>
        <e type="function" args="1">rows</e>
        <e type="operator" args="2">:</e>
        <e type="operand">2</e>
        <e type="operand">2</e>
        <e type="function" args="6">mat</e>
        <e type="operand">okx</e>
        <e type="operand">xh</e>
        <e type="operand">yh</e>
        <e type="operator" args="2">≡</e>
        <e type="bracket">(</e>
        <e type="operand">xh</e>
        <e type="operand">1</e>
        <e type="operator" args="2">≡</e>
        <e type="bracket">(</e>
        <e type="operand">yh</e>
        <e type="operand">1</e>
        <e type="operator" args="2">≡</e>
        <e type="bracket">(</e>
        <e type="operator" args="2">|</e>
        <e type="bracket">(</e>
        <e type="operator" args="2">|</e>
        <e type="operator" args="2">:</e>
        <e type="operand">oky</e>
        <e type="operand">xv</e>
        <e type="operand">yv</e>
        <e type="operator" args="2">≡</e>
        <e type="bracket">(</e>
        <e type="operand">xv</e>
        <e type="operand">1</e>
        <e type="operator" args="2">≡</e>
        <e type="bracket">(</e>
        <e type="operand">yv</e>
        <e type="operand">1</e>
        <e type="operator" args="2">≡</e>
        <e type="bracket">(</e>
        <e type="operator" args="2">|</e>
        <e type="bracket">(</e>
        <e type="operator" args="2">|</e>
        <e type="operator" args="2">:</e>
        <e type="operand">okx</e>
        <e type="operand">oky</e>
        <e type="operator" args="2">&amp;</e>
        <e type="operand">X</e>
        <e type="operand">x</e>
        <e type="operator" args="2">:</e>
        <e type="operand">Y</e>
        <e type="operand">y</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
        <e type="operand">xh</e>
        <e type="operand">yh</e>
        <e type="operator" args="2">&lt;</e>
        <e type="operand">κ</e>
        <e type="operand">2</e>
        <e type="operand">yh</e>
        <e type="function" args="2">range</e>
        <e type="operand">X</e>
        <e type="operand">X</e>
        <e type="operand">x</e>
        <e type="function" args="2">augment</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="3">for</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" args="4">line</e>
        <e type="operand">xh</e>
        <e type="operand">yh</e>
        <e type="operator" args="2">&gt;</e>
        <e type="operand">κ</e>
        <e type="operand">2</e>
        <e type="operand">xh</e>
        <e type="function" args="2">range</e>
        <e type="operand">Y</e>
        <e type="operand">Y</e>
        <e type="operand">y</e>
        <e type="function" args="2">augment</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="3">for</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" args="4">line</e>
        <e type="operand">1</e>
        <e type="function" args="3">if</e>
        <e type="function" args="3">if</e>
        <e type="operand">xv</e>
        <e type="operand">yv</e>
        <e type="operator" args="2">&lt;</e>
        <e type="operand">κ</e>
        <e type="operand">2</e>
        <e type="operand">yv</e>
        <e type="function" args="2">range</e>
        <e type="operand">X</e>
        <e type="operand">X</e>
        <e type="operand">x</e>
        <e type="function" args="2">stack</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="3">for</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" args="4">line</e>
        <e type="operand">xv</e>
        <e type="operand">yv</e>
        <e type="operator" args="2">&gt;</e>
        <e type="operand">κ</e>
        <e type="operand">2</e>
        <e type="operand">xv</e>
        <e type="function" args="2">range</e>
        <e type="operand">Y</e>
        <e type="operand">Y</e>
        <e type="operand">y</e>
        <e type="function" args="2">stack</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="3">for</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" args="4">line</e>
        <e type="operand">1</e>
        <e type="function" args="3">if</e>
        <e type="function" args="3">if</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
        <e type="operand">X</e>
        <e type="operand">Y</e>
        <e type="function" args="2">fun</e>
        <e type="function" args="1">vectorize</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operand" style="string">Incompatible sizes</e>
        <e type="function" args="1">error</e>
        <e type="function" args="3">if</e>
        <e type="operand">4</e>
        <e type="operand">1</e>
        <e type="function" args="6">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="30" left="1413" top="1737" width="250" height="278" color="#000000" bgColor="#ffffff" fontSize="10">
    <math evaluate="false" trailingZeros="true">
      <input>
        <e type="operand">xc</e>
        <e type="operand">x</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">xr</e>
        <e type="operand">x</e>
        <e type="function" args="1">rows</e>
        <e type="operator" args="2">:</e>
        <e type="operand">yc</e>
        <e type="operand">y</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">yr</e>
        <e type="operand">y</e>
        <e type="function" args="1">rows</e>
        <e type="operator" args="2">:</e>
        <e type="operand">2</e>
        <e type="operand">2</e>
        <e type="function" args="6">mat</e>
        <e type="operand">X</e>
        <e type="operand">x</e>
        <e type="operator" args="2">:</e>
        <e type="operand">Y</e>
        <e type="operand">y</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
        <e type="operand">r</e>
        <e type="operand">xr</e>
        <e type="operand">yr</e>
        <e type="function" args="2">Max</e>
        <e type="operator" args="2">:</e>
        <e type="operand">c</e>
        <e type="operand">xc</e>
        <e type="operand">yc</e>
        <e type="function" args="2">Max</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
        <e type="operand">X</e>
        <e type="function" args="1">cols</e>
        <e type="operand">c</e>
        <e type="operator" args="2">&lt;</e>
        <e type="operand">X</e>
        <e type="operand">X</e>
        <e type="operand">x</e>
        <e type="function" args="2">augment</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="2">while</e>
        <e type="operand">Y</e>
        <e type="function" args="1">cols</e>
        <e type="operand">c</e>
        <e type="operator" args="2">&lt;</e>
        <e type="operand">Y</e>
        <e type="operand">Y</e>
        <e type="operand">y</e>
        <e type="function" args="2">augment</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="2">while</e>
        <e type="operand">X</e>
        <e type="function" args="1">rows</e>
        <e type="operand">r</e>
        <e type="operator" args="2">&lt;</e>
        <e type="operand">X</e>
        <e type="operand">X</e>
        <e type="operand">x</e>
        <e type="function" args="2">stack</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="2">while</e>
        <e type="operand">Y</e>
        <e type="function" args="1">rows</e>
        <e type="operand">r</e>
        <e type="operator" args="2">&lt;</e>
        <e type="operand">Y</e>
        <e type="operand">Y</e>
        <e type="operand">y</e>
        <e type="function" args="2">stack</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="2">while</e>
        <e type="operand">X</e>
        <e type="function" args="1">eval</e>
        <e type="operand">Y</e>
        <e type="function" args="1">eval</e>
        <e type="function" args="2">fun</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="1">eval</e>
        <e type="operand">8</e>
        <e type="operand">1</e>
        <e type="function" args="10">line</e>
      </input>
    </math>
  </region>
  <region id="31" left="9" top="1755" width="407" height="558" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="operand">2</e>
        <e type="function" args="1">fun</e>
        <e type="function" args="3">map</e>
        <e type="operand">xc</e>
        <e type="operand">x</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">xr</e>
        <e type="operand">x</e>
        <e type="function" args="1">rows</e>
        <e type="operator" args="2">:</e>
        <e type="operand">yc</e>
        <e type="operand">y</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">yr</e>
        <e type="operand">y</e>
        <e type="function" args="1">rows</e>
        <e type="operator" args="2">:</e>
        <e type="operand">2</e>
        <e type="operand">2</e>
        <e type="function" args="6">mat</e>
        <e type="operand">X</e>
        <e type="operand">x</e>
        <e type="operator" args="2">:</e>
        <e type="operand">Y</e>
        <e type="operand">y</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
        <e type="operand">xc</e>
        <e type="operand">yc</e>
        <e type="operator" args="2">≡</e>
        <e type="operand">0</e>
        <e type="operand">xc</e>
        <e type="operand">yc</e>
        <e type="operator" args="2">&lt;</e>
        <e type="operand">c</e>
        <e type="operand">1</e>
        <e type="operand">xc</e>
        <e type="operand">yc</e>
        <e type="operator" args="2">*</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">xr</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">X</e>
        <e type="operand">r</e>
        <e type="operand">c</e>
        <e type="function" args="3">el</e>
        <e type="operand">X</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">c</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="operand">xc</e>
        <e type="function" args="2">mod</e>
        <e type="operator" args="2">+</e>
        <e type="function" args="3">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operand">c</e>
        <e type="operand">1</e>
        <e type="operand">xc</e>
        <e type="operand">yc</e>
        <e type="operator" args="2">*</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">yr</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">Y</e>
        <e type="operand">r</e>
        <e type="operand">c</e>
        <e type="function" args="3">el</e>
        <e type="operand">Y</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">c</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="operand">yc</e>
        <e type="function" args="2">mod</e>
        <e type="operator" args="2">+</e>
        <e type="function" args="3">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="function" args="3">if</e>
        <e type="function" args="3">if</e>
        <e type="operand">xr</e>
        <e type="operand">yr</e>
        <e type="operator" args="2">≡</e>
        <e type="operand">0</e>
        <e type="operand">xr</e>
        <e type="operand">yr</e>
        <e type="operator" args="2">&lt;</e>
        <e type="operand">c</e>
        <e type="operand">1</e>
        <e type="operand">X</e>
        <e type="function" args="1">cols</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">xr</e>
        <e type="operand">yr</e>
        <e type="operator" args="2">*</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">X</e>
        <e type="operand">r</e>
        <e type="operand">c</e>
        <e type="function" args="3">el</e>
        <e type="operand">X</e>
        <e type="operand">1</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="operand">xr</e>
        <e type="function" args="2">mod</e>
        <e type="operator" args="2">+</e>
        <e type="operand">c</e>
        <e type="function" args="3">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operand">c</e>
        <e type="operand">1</e>
        <e type="operand">Y</e>
        <e type="function" args="1">cols</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">xr</e>
        <e type="operand">yr</e>
        <e type="operator" args="2">*</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">Y</e>
        <e type="operand">r</e>
        <e type="operand">c</e>
        <e type="function" args="3">el</e>
        <e type="operand">Y</e>
        <e type="operand">1</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="operand">yr</e>
        <e type="function" args="2">mod</e>
        <e type="operator" args="2">+</e>
        <e type="operand">c</e>
        <e type="function" args="3">el</e>
        <e type="operator" args="2">:</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="function" args="3">if</e>
        <e type="function" args="3">if</e>
        <e type="operand">X</e>
        <e type="operand">Y</e>
        <e type="function" args="2">fun</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="1">eval</e>
        <e type="operand">5</e>
        <e type="operand">1</e>
        <e type="function" args="7">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="32" left="468" top="1782" width="143" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">plus</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="operator" args="2">+</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="33" left="468" top="1818" width="143" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">times</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="operator" args="2">*</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="34" left="468" top="1863" width="149" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">minus</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="operator" args="2">-</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="35" left="468" top="1908" width="137" height="41" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">divide</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="operator" args="2">/</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="36" left="765" top="2304" width="329" height="103" border="true" color="#000000" bgColor="#ffff80" fontSize="10">
    <math optimize="2" evaluate="false" trailingZeros="true">
      <input>
        <e type="operand">X</e>
        <e type="operand">Y</e>
        <e type="function" args="2">fun</e>
        <e type="function" args="1">vectorize</e>
        <e type="operand">r</e>
        <e type="operand">xr</e>
        <e type="operand">yr</e>
        <e type="function" args="2">Max</e>
        <e type="operator" args="2">:</e>
        <e type="operand">c</e>
        <e type="operand">xc</e>
        <e type="operand">yc</e>
        <e type="function" args="2">Max</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
        <e type="operand">ρ</e>
        <e type="operand">1</e>
        <e type="operand">r</e>
        <e type="function" args="2">range</e>
        <e type="operand">χ</e>
        <e type="operand">1</e>
        <e type="operand">c</e>
        <e type="function" args="2">range</e>
        <e type="operand">Z</e>
        <e type="operand">ρ</e>
        <e type="operand">χ</e>
        <e type="function" args="3">el</e>
        <e type="operand">X</e>
        <e type="operand">ρ</e>
        <e type="operand">χ</e>
        <e type="function" args="3">el</e>
        <e type="operand">Y</e>
        <e type="operand">ρ</e>
        <e type="operand">χ</e>
        <e type="function" args="3">el</e>
        <e type="function" args="2">fun</e>
        <e type="operator" args="2">:</e>
        <e type="function" args="3">for</e>
        <e type="function" args="3">for</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 id="37" left="45" top="2349" width="86" height="24" color="#000000" bgColor="#80ff80" fontSize="10">
    <text lang="eng">
      <p>Examples:</p>
    </text>
  </region>
  <region id="38" left="45" top="2385" width="596" height="99" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z1</e>
        <e type="operand">z2</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">times</e>
        <e type="function" args="3">map</e>
      </input>
      <result action="numeric">
        <e type="operand">4.0000</e>
        <e type="operand">12.0000</e>
        <e type="operand">20.0000</e>
        <e type="operand">32.0000</e>
        <e type="operand">36.0000</e>
        <e type="operand">16.0000</e>
        <e type="operand">2.0000</e>
        <e type="operand">6.0000</e>
        <e type="operand">10.0000</e>
        <e type="operand">16.0000</e>
        <e type="operand">18.0000</e>
        <e type="operand">8.0000</e>
        <e type="operand">7.0000</e>
        <e type="operand">21.0000</e>
        <e type="operand">35.0000</e>
        <e type="operand">56.0000</e>
        <e type="operand">63.0000</e>
        <e type="operand">28.0000</e>
        <e type="operand">3.0000</e>
        <e type="operand">9.0000</e>
        <e type="operand">15.0000</e>
        <e type="operand">24.0000</e>
        <e type="operand">27.0000</e>
        <e type="operand">12.0000</e>
        <e type="operand">1.0000</e>
        <e type="operand">3.0000</e>
        <e type="operand">5.0000</e>
        <e type="operand">8.0000</e>
        <e type="operand">9.0000</e>
        <e type="operand">4.0000</e>
        <e type="operand">5</e>
        <e type="operand">6</e>
        <e type="function" args="32">mat</e>
      </result>
    </math>
  </region>
  <region id="39" left="405" top="2385" width="596" height="99" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z2</e>
        <e type="operand">z1</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">times</e>
        <e type="function" args="3">map</e>
      </input>
      <result action="numeric">
        <e type="operand">4.0000</e>
        <e type="operand">12.0000</e>
        <e type="operand">20.0000</e>
        <e type="operand">32.0000</e>
        <e type="operand">36.0000</e>
        <e type="operand">16.0000</e>
        <e type="operand">2.0000</e>
        <e type="operand">6.0000</e>
        <e type="operand">10.0000</e>
        <e type="operand">16.0000</e>
        <e type="operand">18.0000</e>
        <e type="operand">8.0000</e>
        <e type="operand">7.0000</e>
        <e type="operand">21.0000</e>
        <e type="operand">35.0000</e>
        <e type="operand">56.0000</e>
        <e type="operand">63.0000</e>
        <e type="operand">28.0000</e>
        <e type="operand">3.0000</e>
        <e type="operand">9.0000</e>
        <e type="operand">15.0000</e>
        <e type="operand">24.0000</e>
        <e type="operand">27.0000</e>
        <e type="operand">12.0000</e>
        <e type="operand">1.0000</e>
        <e type="operand">3.0000</e>
        <e type="operand">5.0000</e>
        <e type="operand">8.0000</e>
        <e type="operand">9.0000</e>
        <e type="operand">4.0000</e>
        <e type="operand">5</e>
        <e type="operand">6</e>
        <e type="function" args="32">mat</e>
      </result>
    </math>
  </region>
  <region id="40" left="45" top="2484" width="294" height="99" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z2</e>
        <e type="operand">z2</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">times</e>
        <e type="function" args="3">map</e>
      </input>
      <result action="numeric">
        <e type="operand">16.0000</e>
        <e type="operand">4.0000</e>
        <e type="operand">49.0000</e>
        <e type="operand">9.0000</e>
        <e type="operand">1.0000</e>
        <e type="operand">5</e>
        <e type="operand">1</e>
        <e type="function" args="7">mat</e>
      </result>
    </math>
  </region>
  <region id="41" left="405" top="2511" width="588" height="28" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z1</e>
        <e type="operand">z1</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">times</e>
        <e type="function" args="3">map</e>
      </input>
      <result action="numeric">
        <e type="operand">1.0000</e>
        <e type="operand">9.0000</e>
        <e type="operand">25.0000</e>
        <e type="operand">64.0000</e>
        <e type="operand">81.0000</e>
        <e type="operand">16.0000</e>
        <e type="operand">1</e>
        <e type="operand">6</e>
        <e type="function" args="8">mat</e>
      </result>
    </math>
  </region>
  <region id="42" left="45" top="2583" width="572" height="28" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z1</e>
        <e type="operand">z1</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">plus</e>
        <e type="function" args="3">map</e>
      </input>
      <result action="numeric">
        <e type="operand">2.0000</e>
        <e type="operand">6.0000</e>
        <e type="operand">10.0000</e>
        <e type="operand">16.0000</e>
        <e type="operand">18.0000</e>
        <e type="operand">8.0000</e>
        <e type="operand">1</e>
        <e type="operand">6</e>
        <e type="function" args="8">mat</e>
      </result>
    </math>
  </region>
  <region id="43" left="396" top="2583" width="286" height="99" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">z2</e>
        <e type="operand">z2</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">plus</e>
        <e type="function" args="3">map</e>
      </input>
      <result action="numeric">
        <e type="operand">8.0000</e>
        <e type="operand">4.0000</e>
        <e type="operand">14.0000</e>
        <e type="operand">6.0000</e>
        <e type="operand">2.0000</e>
        <e type="operand">5</e>
        <e type="operand">1</e>
        <e type="function" args="7">mat</e>
      </result>
    </math>
  </region>
  <region id="44" left="18" top="2700" width="616" height="56" border="true" color="#000000" bgColor="#f9fed8" fontSize="10">
    <text lang="eng">
      <p>Function InterX(L1; L2)Input: L1; L2 : 2-rows matrices of coords (Row1 = x-coord; Row2 = y-coord)Output: 2-rows matricx of coords of intersecting points</p>
    </text>
  </region>
  <region id="45" left="18" top="2763" width="655" height="654" color="#000000" bgColor="#ffffff" fontSize="9">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">L1</e>
        <e type="operand">L2</e>
        <e type="function" args="2">InterX</e>
        <e type="operand">x1</e>
        <e type="operand">L1</e>
        <e type="operand">1</e>
        <e type="function" args="2">row</e>
        <e type="function" args="1">transpose</e>
        <e type="operator" args="2">:</e>
        <e type="operand">x2</e>
        <e type="operand">L2</e>
        <e type="operand">1</e>
        <e type="function" args="2">row</e>
        <e type="operator" args="2">:</e>
        <e type="operand">y1</e>
        <e type="operand">L1</e>
        <e type="operand">2</e>
        <e type="function" args="2">row</e>
        <e type="function" args="1">transpose</e>
        <e type="operator" args="2">:</e>
        <e type="operand">y2</e>
        <e type="operand">L2</e>
        <e type="operand">2</e>
        <e type="function" args="2">row</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">4</e>
        <e type="function" args="6">mat</e>
        <e type="operand">dx1</e>
        <e type="operand">x1</e>
        <e type="function" args="1">mdiff</e>
        <e type="operator" args="2">:</e>
        <e type="operand">dy1</e>
        <e type="operand">y1</e>
        <e type="function" args="1">mdiff</e>
        <e type="operator" args="2">:</e>
        <e type="operand">dx2</e>
        <e type="operand">x2</e>
        <e type="function" args="1">mdiff</e>
        <e type="operator" args="2">:</e>
        <e type="operand">dy2</e>
        <e type="operand">y2</e>
        <e type="function" args="1">mdiff</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">4</e>
        <e type="function" args="6">mat</e>
        <e type="operand">k</e>
        <e type="operand">1</e>
        <e type="operand">dx1</e>
        <e type="function" args="1">length</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">S1</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operand">dx1</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operand">y1</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">*</e>
        <e type="operand">dy1</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operand">x1</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">*</e>
        <e type="operator" args="2">-</e>
        <e type="operator" args="2">:</e>
        <e type="operand">k</e>
        <e type="operand">1</e>
        <e type="operand">dx2</e>
        <e type="function" args="1">length</e>
        <e type="function" args="2">range</e>
        <e type="operator" args="2">:</e>
        <e type="operand">S2</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operand">dx2</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operand">y2</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">*</e>
        <e type="operand">dy2</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operand">x2</e>
        <e type="operand">k</e>
        <e type="function" args="2">el</e>
        <e type="operator" args="2">*</e>
        <e type="operator" args="2">-</e>
        <e type="operator" args="2">:</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">t</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">times</e>
        <e type="function" args="3">map</e>
        <e type="operator" args="2">:</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="operand">c</e>
        <e type="operand">d</e>
        <e type="function" args="4">T</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="2">t</e>
        <e type="operand">c</e>
        <e type="operand">d</e>
        <e type="function" args="2">t</e>
        <e type="operator" args="2">-</e>
        <e type="function" args="1">eval</e>
        <e type="operator" args="2">:</e>
        <e type="operand">x</e>
        <e type="operand">y</e>
        <e type="function" args="2">D</e>
        <e type="operand">r</e>
        <e type="operand">x</e>
        <e type="function" args="1">rows</e>
        <e type="operator" args="2">:</e>
        <e type="operand">c</e>
        <e type="operand">x</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
        <e type="operand">X</e>
        <e type="operand">x</e>
        <e type="operand">1</e>
        <e type="operand">r</e>
        <e type="function" args="2">range</e>
        <e type="operand">1</e>
        <e type="operand">c</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="function" args="3">el</e>
        <e type="operand">y</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">minus</e>
        <e type="function" args="3">map</e>
        <e type="operator" args="2">:</e>
        <e type="operand">Y</e>
        <e type="operand">x</e>
        <e type="operand">1</e>
        <e type="operand">r</e>
        <e type="function" args="2">range</e>
        <e type="operand">2</e>
        <e type="operand">c</e>
        <e type="function" args="2">range</e>
        <e type="function" args="3">el</e>
        <e type="operand">y</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">minus</e>
        <e type="function" args="3">map</e>
        <e type="operator" args="2">:</e>
        <e type="operand">X</e>
        <e type="operand">Y</e>
        <e type="function" args="2">t</e>
        <e type="operand">4</e>
        <e type="operand">1</e>
        <e type="function" args="6">line</e>
        <e type="operator" args="2">:</e>
        <e type="operand">C1</e>
        <e type="operand">dx1</e>
        <e type="operand">y2</e>
        <e type="operand">dy1</e>
        <e type="operand">x2</e>
        <e type="function" args="4">T</e>
        <e type="operand">S1</e>
        <e type="function" args="2">D</e>
        <e type="operator" args="2">:</e>
        <e type="operand">C2</e>
        <e type="operand">y1</e>
        <e type="operand">dx2</e>
        <e type="operand">x1</e>
        <e type="operand">dy2</e>
        <e type="function" args="4">T</e>
        <e type="function" args="1">transpose</e>
        <e type="operand">S2</e>
        <e type="function" args="2">D</e>
        <e type="operator" args="2">:</e>
        <e type="operand">C1</e>
        <e type="operand">C1</e>
        <e type="operand">0</e>
        <e type="operator" args="2">≤</e>
        <e type="function" args="1">vectorize</e>
        <e type="operator" args="2">:</e>
        <e type="operand">C2</e>
        <e type="operand">C2</e>
        <e type="operand">0</e>
        <e type="operator" args="2">≤</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="1">transpose</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
        <e type="operand">m</e>
        <e type="operand">n</e>
        <e type="operand">vals</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="function" args="5">mat</e>
        <e type="operand">C1</e>
        <e type="operand">C2</e>
        <e type="operator" args="2">&amp;</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="1">find</e>
        <e type="function" args="1">transpose</e>
        <e type="function" args="1">eval</e>
        <e type="operator" args="2">:</e>
        <e type="operand">m</e>
        <e type="operand">m</e>
        <e type="function" args="1">transpose</e>
        <e type="operator" args="2">:</e>
        <e type="operand">dx2</e>
        <e type="operand">dx2</e>
        <e type="function" args="1">transpose</e>
        <e type="operator" args="2">:</e>
        <e type="operand">dy2</e>
        <e type="operand">dy2</e>
        <e type="function" args="1">transpose</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="function" args="5">mat</e>
        <e type="operand">L</e>
        <e type="operand">dy2</e>
        <e type="operand">n</e>
        <e type="function" args="2">el</e>
        <e type="operand">dx1</e>
        <e type="operand">m</e>
        <e type="function" args="2">el</e>
        <e type="operand">dy1</e>
        <e type="operand">m</e>
        <e type="function" args="2">el</e>
        <e type="operand">dx2</e>
        <e type="operand">n</e>
        <e type="function" args="2">el</e>
        <e type="function" args="4">T</e>
        <e type="operator" args="2">:</e>
        <e type="operand">Lo</e>
        <e type="operand">L</e>
        <e type="function" args="1">find</e>
        <e type="operand">1</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">eval</e>
        <e type="operator" args="2">:</e>
        <e type="operand">m</e>
        <e type="operand">m</e>
        <e type="operand">Lo</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">eval</e>
        <e type="operator" args="2">:</e>
        <e type="operand">n</e>
        <e type="operand">n</e>
        <e type="operand">Lo</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">eval</e>
        <e type="operator" args="2">:</e>
        <e type="operand">L</e>
        <e type="operand">L</e>
        <e type="operand">Lo</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">eval</e>
        <e type="operator" args="2">:</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="function" args="5">mat</e>
        <e type="operand">P1</e>
        <e type="operand">dx2</e>
        <e type="operand">n</e>
        <e type="function" args="2">el</e>
        <e type="operand">S1</e>
        <e type="operand">m</e>
        <e type="function" args="2">el</e>
        <e type="operand">dx1</e>
        <e type="operand">m</e>
        <e type="function" args="2">el</e>
        <e type="operand">S2</e>
        <e type="operand">n</e>
        <e type="function" args="2">el</e>
        <e type="function" args="4">T</e>
        <e type="operator" args="2">:</e>
        <e type="operand">P2</e>
        <e type="operand">dy2</e>
        <e type="operand">n</e>
        <e type="function" args="2">el</e>
        <e type="operand">S1</e>
        <e type="operand">m</e>
        <e type="function" args="2">el</e>
        <e type="operand">dy1</e>
        <e type="operand">m</e>
        <e type="function" args="2">el</e>
        <e type="operand">S2</e>
        <e type="operand">n</e>
        <e type="function" args="2">el</e>
        <e type="function" args="4">T</e>
        <e type="operator" args="2">:</e>
        <e type="operand">lc</e>
        <e type="operand">L</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
        <e type="operand">P1</e>
        <e type="operand">P2</e>
        <e type="function" args="2">augment</e>
        <e type="operand">L</e>
        <e type="operand">1</e>
        <e type="operand">L</e>
        <e type="function" args="1">rows</e>
        <e type="function" args="2">range</e>
        <e type="operand">1</e>
        <e type="operand">1</e>
        <e type="operand">lc</e>
        <e type="function" args="2">range</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="operand">lc</e>
        <e type="function" args="2">mod</e>
        <e type="function" args="1">vectorize</e>
        <e type="operator" args="2">+</e>
        <e type="function" args="3">el</e>
        <e type="operand">A</e>
        <e type="operand">B</e>
        <e type="function" args="2">divide</e>
        <e type="function" args="3">map</e>
        <e type="operand">9</e>
        <e type="operand">1</e>
        <e type="function" args="11">line</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" args="2">Zeros</e>
        <e type="function" args="2">try</e>
        <e type="operand">13</e>
        <e type="operand">1</e>
        <e type="function" args="15">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="46" left="783" top="2952" width="324" height="40" border="true" color="#000000" bgColor="#f9fed8" fontSize="10">
    <text lang="eng">
      <p>Function D(x; y)Helper function for InterX. See below.</p>
    </text>
  </region>
  <region id="47" left="765" top="3240" width="302" height="43" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">L</e>
        <e type="function" args="1">mwfind</e>
        <e type="operand">1</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">eval</e>
        <e type="operand">L</e>
        <e type="operand">0</e>
        <e type="operator" args="2">≠</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="1">mwfind</e>
        <e type="operand">1</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">eval</e>
        <e type="operator" args="2">≡</e>
      </input>
    </math>
  </region>
  <region id="48" left="774" top="3393" width="99" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">to</e>
        <e type="operand">0</e>
        <e type="function" args="1">time</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="49" left="9" top="3429" width="306" height="24" border="true" color="#000000" bgColor="#80ff80" fontSize="10">
    <text lang="eng">
      <p>Let's test it with a simple example:</p>
    </text>
  </region>
  <region id="50" left="9" top="3456" width="182" height="45" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">L1</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="operand">3</e>
        <e type="operand">4</e>
        <e type="operand">5</e>
        <e type="operand">6</e>
        <e type="operand">8</e>
        <e type="operand">9</e>
        <e type="operand">0</e>
        <e type="operand">1</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="operand">2</e>
        <e type="operand">0</e>
        <e type="operand">3</e>
        <e type="operand">0.5</e>
        <e type="operand">2</e>
        <e type="operand">8</e>
        <e type="function" args="18">mat</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="51" left="252" top="3456" width="180" height="45" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">L2</e>
        <e type="operand">3</e>
        <e type="operand">4</e>
        <e type="operand">5</e>
        <e type="operand">6</e>
        <e type="operand">6</e>
        <e type="operand">5</e>
        <e type="operand">7</e>
        <e type="operand">9</e>
        <e type="operand">7</e>
        <e type="operand">0</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="operand">3</e>
        <e type="operand">2</e>
        <e type="operand">0</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="operand">4</e>
        <e type="operand">2</e>
        <e type="operand">9</e>
        <e type="function" args="20">mat</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="52" left="774" top="3456" width="301" height="135" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">tt</e>
        <e type="operand">L1</e>
        <e type="operand">L2</e>
        <e type="function" args="2">InterX</e>
        <e type="operator" args="2">:</e>
      </input>
      <result action="numeric">
        <e type="operand">4.5000</e>
        <e type="operand">2.0000</e>
        <e type="operand">5.5000</e>
        <e type="operand">1.0000</e>
        <e type="operand">5.6667</e>
        <e type="operand">0.6667</e>
        <e type="operand">7.2500</e>
        <e type="operand">1.8750</e>
        <e type="operand">7.8333</e>
        <e type="operand">2.7500</e>
        <e type="operand">8.7500</e>
        <e type="operand">1.1250</e>
        <e type="operand">8.5000</e>
        <e type="operand">1.7500</e>
        <e type="operand">7</e>
        <e type="operand">2</e>
        <e type="function" args="16">mat</e>
      </result>
    </math>
  </region>
  <region id="53" left="18" top="3519" width="368" height="28" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">plot1</e>
        <e type="operand">L1</e>
        <e type="operand">L2</e>
        <e type="function" args="2">InterX</e>
        <e type="operand" style="string">o</e>
        <e type="operand">12</e>
        <e type="operand" style="string">Green</e>
        <e type="function" args="4">plotG</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="54" left="18" top="3555" width="702" height="252" color="#000000" bgColor="#ffffff" fontSize="10" showInputData="False">
    <plot type="2d" render="lines" scale_x="3.13631992578674" scale_y="3.13631992578674" scale_z="3.13631992578674" rotate_x="0" rotate_y="0" rotate_z="0" transpose_x="-315" transpose_y="-109" transpose_z="0">
      <input>
        <e type="operand">L1</e>
        <e type="function" args="1">transpose</e>
        <e type="operand">L2</e>
        <e type="function" args="1">transpose</e>
        <e type="operand">plot1</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">sys</e>
      </input>
    </plot>
  </region>
  <region id="55" left="9" top="3834" width="258" height="24" border="true" color="#000000" bgColor="#80ff80" fontSize="10">
    <text lang="eng">
      <p>and a bit more complicate one:</p>
    </text>
  </region>
  <region id="56" left="9" top="3861" width="166" height="52" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">t</e>
        <e type="operand">0</e>
        <e type="operand">2</e>
        <e type="operand">π</e>
        <e type="operator" args="2">*</e>
        <e type="bracket">(</e>
        <e type="operand">2</e>
        <e type="operand">π</e>
        <e type="operand">20</e>
        <e type="operator" args="2">/</e>
        <e type="operator" args="2">*</e>
        <e type="function" args="3">range</e>
        <e type="function" args="1">transpose</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="57" left="252" top="3861" width="133" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">r1</e>
        <e type="operand">4</e>
        <e type="operand">t</e>
        <e type="operator" args="2">*</e>
        <e type="function" args="1">sin</e>
        <e type="function" args="1">vectorize</e>
        <e type="operand">2</e>
        <e type="operator" args="2">+</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="58" left="477" top="3861" width="133" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">r2</e>
        <e type="operand">8</e>
        <e type="operand">t</e>
        <e type="operator" args="2">*</e>
        <e type="function" args="1">sin</e>
        <e type="function" args="1">vectorize</e>
        <e type="operand">2</e>
        <e type="operator" args="2">+</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="59" left="9" top="3915" width="85" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">c</e>
        <e type="operand">t</e>
        <e type="function" args="1">cos</e>
        <e type="function" args="1">vectorize</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="60" left="135" top="3915" width="85" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">s</e>
        <e type="operand">t</e>
        <e type="function" args="1">sin</e>
        <e type="function" args="1">vectorize</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="61" left="252" top="3915" width="191" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">xy1</e>
        <e type="operand">r1</e>
        <e type="operand">c</e>
        <e type="operator" args="2">*</e>
        <e type="function" args="1">vectorize</e>
        <e type="operand">r1</e>
        <e type="operand">s</e>
        <e type="operator" args="2">*</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="2">stack</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="62" left="477" top="3915" width="191" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">xy2</e>
        <e type="operand">r2</e>
        <e type="operand">c</e>
        <e type="operator" args="2">*</e>
        <e type="function" args="1">vectorize</e>
        <e type="operand">r2</e>
        <e type="operand">s</e>
        <e type="operator" args="2">*</e>
        <e type="function" args="1">vectorize</e>
        <e type="function" args="2">stack</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="63" left="9" top="3969" width="173" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">XY</e>
        <e type="operand">xy1</e>
        <e type="operand">xy2</e>
        <e type="function" args="2">InterX</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="64" left="360" top="3969" width="275" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" trailingZeros="true">
      <input>
        <e type="operand">plot2</e>
        <e type="operand">XY</e>
        <e type="operand" style="string">o</e>
        <e type="operand">12</e>
        <e type="operand" style="string">Green</e>
        <e type="function" args="4">plotG</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="65" left="9" top="4005" width="715" height="319" color="#000000" bgColor="#ffffff" fontSize="10" showInputData="False">
    <plot type="2d" render="lines" scale_x="3.74005008361004" scale_y="7.21541655725944" scale_z="7.93695821298538" rotate_x="0" rotate_y="0" rotate_z="0" transpose_x="-6" transpose_y="5" transpose_z="0">
      <input>
        <e type="operand">xy1</e>
        <e type="function" args="1">transpose</e>
        <e type="operand">xy2</e>
        <e type="function" args="1">transpose</e>
        <e type="operand">plot2</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">sys</e>
      </input>
    </plot>
  </region>
  <region id="66" left="783" top="4311" width="183" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math trailingZeros="true">
      <input>
        <e type="operand">0</e>
        <e type="function" args="1">time</e>
        <e type="operand">to</e>
        <e type="operator" args="2">-</e>
      </input>
      <result action="numeric">
        <e type="operand">1.3990</e>
        <e type="operand" style="unit">s</e>
        <e type="operator" args="2">*</e>
      </result>
    </math>
  </region>
  <region id="67" left="18" top="4383" width="307" height="26" border="true" color="#000000" bgColor="#ffffe1" fontSize="10">
    <math fractionType="auto" decimalPlaces="6">
      <input>
        <e type="operand">CWD</e>
        <e type="operand" style="string">C:\SmathFile</e>
        <e type="function" args="1">CurrentDirectory</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="68" left="18" top="4410" width="257" height="26" border="true" color="#000000" bgColor="#ffffe1" fontSize="10">
    <math optimize="2">
      <input>
        <e type="operand">T1</e>
        <e type="operand">CWD</e>
        <e type="operand" style="string">TrifoliumBlue</e>
        <e type="function" args="2">rfile</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="69" left="18" top="4437" width="249" height="26" border="true" color="#000000" bgColor="#ffffe1" fontSize="10">
    <math optimize="2">
      <input>
        <e type="operand">T2</e>
        <e type="operand">CWD</e>
        <e type="operand" style="string">TrifoliumRed</e>
        <e type="function" args="2">rfile</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="70" left="477" top="4437" width="240" height="158" color="#000000" bgColor="#ffffff" fontSize="10">
    <plot type="2d" render="points" scale_x="7.03756406376255" scale_y="7.03756406376255" scale_z="7.03756406376255" rotate_x="0" rotate_y="0" rotate_z="0" transpose_x="0" transpose_y="0" transpose_z="0">
      <input>
        <e type="operand">T1</e>
        <e type="operand">T2</e>
        <e type="operand">2</e>
        <e type="operand">1</e>
        <e type="function" args="4">sys</e>
      </input>
    </plot>
  </region>
  <region id="71" left="18" top="4464" width="173" height="35" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2">
      <input>
        <e type="operand">Ω</e>
        <e type="operand">T1</e>
        <e type="function" args="1">transpose</e>
        <e type="operand">T2</e>
        <e type="function" args="1">transpose</e>
        <e type="function" args="2">InterX</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="72" left="18" top="4509" width="427" height="28" color="#000000" bgColor="#ffffff" fontSize="10">
    <math fractionType="auto" decimalPlaces="3">
      <input>
        <e type="operand">Intersect</e>
        <e type="operand">Ω</e>
        <e type="operand">1</e>
        <e type="function" args="2">col</e>
        <e type="operand">Ω</e>
        <e type="operand">2</e>
        <e type="function" args="2">col</e>
        <e type="operand" style="string">o</e>
        <e type="operand">6</e>
        <e type="operand" style="string">black</e>
        <e type="function" args="5">plotG</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="73" left="18" top="4536" width="147" height="26" color="#ffff00" bgColor="#010101" fontSize="10">
    <math fractionType="auto" decimalPlaces="0">
      <input>
        <e type="operand">1</e>
        <e type="function" args="1">time</e>
        <e type="operand">to</e>
        <e type="operator" args="2">-</e>
      </input>
      <contract>
        <e type="operand" style="unit">min</e>
      </contract>
      <result action="numeric">
        <e type="operand">2</e>
      </result>
    </math>
  </region>
  <region id="74" left="27" top="4599" width="415" height="301" color="#000000" bgColor="#ffffff" fontSize="10">
    <plot type="2d" render="lines" scale_x="16.4282658550694" scale_y="16.4282658550694" scale_z="16.4282658550694" rotate_x="0" rotate_y="0" rotate_z="0" transpose_x="-10" transpose_y="18" transpose_z="0">
      <input>
        <e type="operand">T1</e>
        <e type="operand">T2</e>
        <e type="operand">Intersect</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">sys</e>
      </input>
    </plot>
  </region>
</regions>