<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    Hello Adrian,<br>
    <br>
    Indeed the '\' operator is easy-to-use and powerful (Lapack-based).
    I advised it in a private exchange with Tunji (which should have
    been made public):<br>
    <br>
    "<br>
     Let's call your 6x6 matrix 'M'.<br>
    <br>
     Try   --> res = M(:,1:5) \ Mat(:, 6)<br>
    <br>
     The idea is to divide M into a right-hand side ('b' in linsolve
    page) and a left-hand side ('A') and use the '\' solving operator.<br>
    <br>
     If you want a function to enter your coefficients directly, you can
    write it:<br>
    <br>
     function res = mySolve(M)<br>
         res = M(:,1:5) \ Mat(:, 6);<br>
     endfunction<br>
    "<br>
    <br>
    Regards,<br>
    Paul<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 03/19/2014 10:47 AM,
      <a class="moz-txt-link-abbreviated" href="mailto:aweeks@hidglobal.com">aweeks@hidglobal.com</a> wrote:<br>
    </div>
    <blockquote
cite="mid:OFCAF1F19A.EEC2BFEE-ON80257CA0.0032EC29-80257CA0.0035BC9D@prox.com"
      type="cite">
      <p><font face="sans-serif" size="2">Hi Paul,</font><br>
        <br>
        <font face="sans-serif" size="2">I have a suggestion but also a
          more general observation.</font><br>
        <br>
        <font face="sans-serif" size="2">I have also been solving
          simultaneous linear equations of the form A * x = b.  My first
          thought was to use the method:</font><br>
        <br>
        <font face="sans-serif" size="2"> x = A \ b</font><br>
        <br>
        <font face="sans-serif" size="2">and it seemed to me that if
          Tunji's equations are well-behaved then this may be the
          easiest method, rather than using 'linsolve'.</font><br>
        <br>
        <font face="sans-serif" size="2">In my case I'm trying to solve
          electrical circuit equations which are sparse and include
          complex values.  I used  x = A \ b to begin with but for some
          component values I get messages like:<br>
        </font><br>
        <font face="sans-serif" size="2"> Warning :</font><br>
        <font face="sans-serif" size="2"> matrix is close to singular or
          badly scaled. rcond =    1.0388D-08</font><br>
        <font face="sans-serif" size="2"> computing least squares
          solution. (see lsq).</font><br>
        <br>
        <font face="sans-serif" size="2">The method goes to completion
          but the results are obviously wrong.</font><br>
        <font face="sans-serif" size="2">If I use 'linsolve' instead, it
          goes to completion without producing any warnings or errors
          but the results are wrong.</font><br>
        <font face="sans-serif" size="2">For me, 'umfpack' is the best
          method by far and works very well.</font><br>
        <br>
        <font face="sans-serif" size="2">This is a situation which has
          occurred several times before.  SciLab is a very powerful
          piece of software and as a result there may (apparently) be
          several methods of doing the same thing but there are rarely
          explanations of how each method works or why you would use one
          method rather than another.</font><br>
        <br>
        <font face="sans-serif" size="2">Best wishes,</font><br>
        <br>
        <font face="sans-serif" size="2">Adrian.</font><br>
        <br>
        <br>
        <table border="0" cellpadding="0" cellspacing="0">
          <tbody>
            <tr valign="top">
              <td class="t" valign="middle" width="178">
                <ul style="padding-left: 1pt">
                  <font color="#333333" face="Arial" size="2"><b>Adrian
                      Weeks </b></font><font color="#666666"
                    face="Arial" size="1"><br>
                    Development Engineer <br>
                    <br>
                    <br>
                    HID Global,<br>
                    3 Cae Gwyrdd,<br>
                    Green Meadow Springs<br>
                    Business Park,<br>
                    Cardiff CF15 7AB,<br>
                    United Kingdom.<br>
                    +44 (0)29 20528523 (Office)</font><font
                    color="#0000FF" face="Arial" size="1"><u><br>
                    </u></font><a moz-do-not-send="true"
                    href="mailto:aweeks@hidglobal.com"><font
                      color="#0000FF" face="Arial" size="1"><u>aweeks@hidglobal.com</u></font></a><font
                    color="#0000FF" face="Arial" size="1"><u><br>
                    </u></font><a moz-do-not-send="true"
                    href="http://www.hidglobal.com/"><font
                      color="#0000FF" face="Arial" size="1"><u>www.hidglobal.com</u></font></a>
                </ul>
              </td>
              <td valign="middle" width="139">
                <ul style="padding-left: 1pt">
                  <a moz-do-not-send="true"
                    href="http://www.hidglobal.com/"><img
                      src="cid:part3.02010501.02070409@scilab-enterprises.com"
                      border="0" height="170" width="130"></a>
                </ul>
              </td>
            </tr>
          </tbody>
        </table>
        <br>
        <br>
        <img src="cid:part5.03040407.02040503@scilab-enterprises.com"
          alt="Inactive hide details for Paul Bignier ---18/03/2014
          10:01:09---Hi Tunji, linsolve help page" border="0"
          height="16" width="16"><font color="#424282" face="sans-serif"
          size="2">Paul Bignier ---18/03/2014 10:01:09---Hi Tunji,
          linsolve help page</font><br>
        <br>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tbody>
            <tr valign="top">
              <td width="1%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="96"><br>
                <ul style="padding-left: 4pt">
                  <font color="#5F5F5F" face="sans-serif" size="1">From:</font>
                </ul>
              </td>
              <td width="100%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="1"><br>
                <font face="sans-serif" size="1">Paul Bignier
                  <a class="moz-txt-link-rfc2396E" href="mailto:paul.bignier@scilab-enterprises.com"><paul.bignier@scilab-enterprises.com></a></font></td>
            </tr>
            <tr valign="top">
              <td width="1%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="96"><br>
                <ul style="padding-left: 4pt">
                  <font color="#5F5F5F" face="sans-serif" size="1">To:</font>
                </ul>
              </td>
              <td width="100%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="1"><br>
                <font face="sans-serif" size="1">"International users
                  mailing list for Scilab."
                  <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.scilab.org"><users@lists.scilab.org></a>, <a class="moz-txt-link-abbreviated" href="mailto:iootunniyi@futa.edu.ng">iootunniyi@futa.edu.ng</a></font></td>
            </tr>
            <tr valign="top">
              <td width="1%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="96"><br>
                <ul style="padding-left: 4pt">
                  <font color="#5F5F5F" face="sans-serif" size="1">Date:</font>
                </ul>
              </td>
              <td width="100%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="1"><br>
                <font face="sans-serif" size="1">18/03/2014 10:01</font></td>
            </tr>
            <tr valign="top">
              <td width="1%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="96"><br>
                <ul style="padding-left: 4pt">
                  <font color="#5F5F5F" face="sans-serif" size="1">Subject:</font>
                </ul>
              </td>
              <td width="100%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="1"><br>
                <font face="sans-serif" size="1">Re: [Scilab-users]
                  Solving linear simultaneous equations</font></td>
            </tr>
            <tr valign="top">
              <td width="1%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="96"><br>
                <ul style="padding-left: 4pt">
                  <font color="#5F5F5F" face="sans-serif" size="1">Sent
                    by:</font>
                </ul>
              </td>
              <td width="100%"><img
                  src="cid:part6.08030805.01090301@scilab-enterprises.com"
                  alt="" border="0" height="1" width="1"><br>
                <font face="sans-serif" size="1">"users"
                  <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.scilab.org"><users-bounces@lists.scilab.org></a></font></td>
            </tr>
          </tbody>
        </table>
      </p>
      <hr style="color:#8091A5; " align="left" noshade="noshade"
        size="2" width="100%"><br>
      <br>
      <br>
      <font face="serif" size="3"><br>
        Hi Tunji,<br>
        <br>
        linsolve </font><a moz-do-not-send="true"
        href="http://help.scilab.org/docs/5.4.1/en_US/linsolve.html"><font
          color="#0000FF" face="serif" size="3"><u>help page</u></font></a><font
        face="serif" size="3"> contains utilization examples.<br>
        <br>
        If you still cannot use it, please tell us more about the
        problem you are trying to solve.<br>
        <br>
        Regards,<br>
        Paul<br>
        <br>
      </font><br>
      <font face="serif" size="3">On 03/18/2014 10:16 AM, 'Tunji
        OTUNNIYI wrote:</font>
      <ul style="padding-left: 36pt">
        <font color="#1F497D" face="Calibri" size="2">Hello:</font><br>
        <font face="Calibri" size="2"> </font><br>
        <font face="Calibri" size="2">I am quite a starter here.</font><br>
        <font color="#1F497D" face="Calibri" size="2"> </font><br>
        <font face="Calibri" size="2">Could someone please help me
          through solving n x n linear simultaneous equations.</font><br>
        <font face="Calibri" size="2">I saw linsolve in help, but can’t
          follow through</font><font color="#1F497D" face="Calibri"
          size="2"> </font><font face="Calibri" size="2">the arguments.
          Applying the calling sequence to a simple example will be of
          help.</font><br>
        <font face="Calibri" size="2">Thanks a lot.</font><br>
        <font face="Calibri" size="2"> </font><br>
        <font face="Calibri" size="2">Tunji OTUNNIYI | MME SEET FUTA
          Akure, Nigeria.</font><br>
        <font face="Calibri" size="2"> </font>
        <p><font face="serif" size="3"><br>
          </font><br>
          <tt><font size="3">_______________________________________________<br>
              users mailing list<br>
            </font></tt><a moz-do-not-send="true"
            href="mailto:users@lists.scilab.org"><tt><font
                color="#0000FF" size="3"><u>users@lists.scilab.org</u></font></tt></a><tt><font
              size="3"><br>
            </font></tt><a moz-do-not-send="true"
            href="http://lists.scilab.org/mailman/listinfo/users"><tt><font
                color="#0000FF" size="3"><u>http://lists.scilab.org/mailman/listinfo/users</u></font></tt></a><tt><font
              size="3"><br>
            </font></tt></p>
      </ul>
      <br>
      <tt><font size="3">-- <br>
          Paul BIGNIER<br>
          Development engineer<br>
          -----------------------------------------------------------<br>
          Scilab Enterprises<br>
          143bis rue Yves Le Coz - 78000 Versailles, France<br>
          Phone: +33.1.80.77.04.69<br>
        </font></tt><a moz-do-not-send="true"
        href="http://www.scilab-enterprises.com/"><tt><font
            color="#0000FF" size="3"><u>http://www.scilab-enterprises.com</u></font></tt></a><tt><font
          size="3"> </font></tt><tt><font size="2">_______________________________________________<br>
          users mailing list<br>
          <a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
        </font></tt><tt><font size="2"><a moz-do-not-send="true"
            href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a></font></tt><tt><font
          size="2"><br>
        </font></tt><br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Paul BIGNIER
Development engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.69
<a class="moz-txt-link-freetext" href="http://www.scilab-enterprises.com">http://www.scilab-enterprises.com</a> </pre>
  </body>
</html>