This seems to work nicely except for one very big problem: it does not check for expression zero equivalence except syntactically.  See below for an example.<br><br>              -s<br><br>(%i1) mm: matrix([2*sin(x),sin(2*x)],[1,cos(x)]);<br>
<br>(%o1) matrix([2*sin(x),sin(2*x)],[1,cos(x)])<br><br>(%i2) moore_penrose_pseudoinverse(mm);<br><br>(%o2) matrix([-cos(x)/(sin(2*x)-2*cos(x)*sin(x)),<br>              sin(2*x)/(sin(2*x)-2*cos(x)*sin(x))],<br>             [1/(sin(2*x)-2*cos(x)*sin(x)),<br>
              -2*sin(x)/(sin(2*x)-2*cos(x)*sin(x))])<br><br>(%i3) trigexpand(%);<br>Division by 0                                   &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; oops!<br> -- an error.  To debug this try debugmode(true);<br>
<br>(%i4) moore_penrose_pseudoinverse(trigexpand(mm));<br><br>(%o4) matrix([2*sin(x)/((4*cos(x)^2+4)*sin(x)^2+cos(x)^2+1),<br>              1/((4*cos(x)^2+4)*sin(x)^2+cos(x)^2+1)],<br>             [2*cos(x)*sin(x)/((4*cos(x)^2+4)*sin(x)^2+cos(x)^2+1),<br>
              cos(x)/((4*cos(x)^2+4)*sin(x)^2+cos(x)^2+1)])<br><br><br><br><div class="gmail_quote">On Mon, Aug 24, 2009 at 2:19 PM, Barton Willis <span dir="ltr">&lt;<a href="mailto:willisb@unk.edu">willisb@unk.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Try this and let me know how poorly / well it works:<br>
<br>
(%i50) load(linearalgebra)$<br>
<br>
(%i53) moore_penrose_pseudoinverse(matrix([a,b],[2*a,2*b]));<br>
(%o53)<br>
matrix([a/(5*b^2+5*a^2),(2*a)/(5*b^2+5*a^2)],[b/(5*b^2+5*a^2),(2*b)/(5*b^2+5*a^2)])<br>
<br>
<br>
(1) Unlike most functions in linearalgebra, moore_penrose_pseudoinverse<br>
doesn&#39;t autoload;<br>
assuming that moore_penrose_pseudoinverse is at least useable, that&#39;s a<br>
bug.<br>
<br>
(2) There is no user documentation for moore_penrose_pseudoinverse; and<br>
that&#39;s a bug too.<br>
<br>
Barton<br>
<br>
<a href="mailto:maxima-bounces@math.utexas.edu">maxima-bounces@math.utexas.edu</a> wrote on 08/24/2009 11:51:17 AM:<br>
<br>
<br>
&gt;<br>
&gt; Does anyone know if there is some implementation for calculating a<br>
&gt; pseudo inverse in Maxima? I&#39;ve found this link - &quot;http://<br>
&gt; <a href="http://www.math.utexas.edu/pipermail/maxima/2007/008247.html" target="_blank">www.math.utexas.edu/pipermail/maxima/2007/008247.html</a>&quot; - but it<br>
&gt; seems that the implementation is not exactly for Maxima and it only<br>
&gt; handle numerical matrices...<br>
<br>
_______________________________________________<br>
Maxima mailing list<br>
<a href="mailto:Maxima@math.utexas.edu">Maxima@math.utexas.edu</a><br>
<a href="http://www.math.utexas.edu/mailman/listinfo/maxima" target="_blank">http://www.math.utexas.edu/mailman/listinfo/maxima</a><br>
</blockquote></div><br>