tag:blogger.com,1999:blog-12023297828140004362024-02-20T08:49:52.590+01:00GSoC MMXV Matrix Fun*Antonio Pino Robleshttp://www.blogger.com/profile/11280316372713175482noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-1202329782814000436.post-89311242701159084592015-05-25T23:44:00.002+02:002015-05-25T23:44:23.291+02:00On galleries and the beginning of summer<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<br />
<div style="background-color: white; line-height: 19.0499992370605px; margin-bottom: 0.5em; margin-top: 0.4em;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">After the community bonding period and before starting today the coding period, I will briefly list the transformation that has undergone my initial proposal: from just implementing new algorithms and then add them to GNU Octave, to various modifications of GNU Octave itself so that Higham's toolboxes run smoothly and in the end add the new algorithms. Sticking to what I said before, I expect to be doing the modifications (e.g. new bugs, patches, toolboxes) most of the first half of the coding period. From there we aim to go as far as we can about matrix functions, I will do so. <span style="line-height: 19.0499992370605px;">These changes are noted in the new </span><a href="http://wiki.octave.org/User:Antonio_Pino#TENTATIVE_TIME_LINE" style="line-height: 19.0499992370605px;">time line</a><span style="line-height: 19.0499992370605px;">.</span></span></div>
<div style="background-color: white; line-height: 19.0499992370605px; margin-bottom: 0.5em; margin-top: 0.4em;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">During the community bonding period I have been setting up, you might have seen me at freenode. I have been becoming more and more acquainted with GNU Octave, and found out that the </span><span style="font-family: Courier New, Courier, monospace;">gallery</span><i style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"> </i><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">function was broken, with unassigned variables and missing auxiliary functions. This function will prove useful to test matrix functions, because the eigenvalue decomposition strategy (if $A=VDV^{-1}$ then $f\left(A\right) = V f\left( D \right) V^{-1}$) yields a big error </span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;">using the ill conditioned matrices </span><span style="line-height: 19.0499992370605px;"><span style="font-family: Courier New, Courier, monospace;">gallery </span></span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;">provides</span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;">. Another example are the useful positive definite matrices that have a computable principal p-th root. </span><span style="line-height: 19.0499992370605px;"><span style="font-family: Courier New, Courier, monospace;">gallery</span></span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;"> is indeed interesting for anyone looking for a matrix with a special characteristic to test an edge case of a function.</span></div>
<div style="background-color: white; line-height: 19.0499992370605px; margin-bottom: 0.5em; margin-top: 0.4em;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;">Besides, I also have had the chance to see a plethora of Matlab-style short circuit operators, looping with infinite ranges, and even weird undocumented functions like </span><i style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;">superiorfloat</i><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;"> (it returns either </span><span style="font-family: Courier New, Courier, monospace; line-height: 19.0499992370605px;">"single"</span><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;"> or </span><span style="font-family: Courier New, Courier, monospace; line-height: 19.0499992370605px;">"double"</span><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;"> strings depending on the input). What let Carnë to point me to </span><i style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;"><a href="http://undocumentedmatlab.com/">Undocumented Matlab</a></i><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;"> blog, where they document its </span><i style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;">unsupported hidden underbelly</i><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif; line-height: 19.0499992370605px;">. More quirks (and their solutions) on the next post. </span></div>
<div style="background-color: white; line-height: 19.0499992370605px; margin-bottom: 0.5em; margin-top: 0.4em;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="line-height: 19.0499992370605px;">A</span><span style="line-height: 19.0499992370605px;"> final thank goes to The Project in general and my mentors (Carnë and Mario) in particular for this opportunity. </span>I hope everyone pleasantly codes their summer away!</span></div>
Antonio Pino Robleshttp://www.blogger.com/profile/11280316372713175482noreply@blogger.com0tag:blogger.com,1999:blog-1202329782814000436.post-77570181251882220772015-05-06T13:51:00.000+02:002015-05-25T22:05:07.084+02:00GSoC 2015 - Matrix Functions in GNU Octave<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<br />
<h3>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">
A brief intro</span></h3>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">First of all, let me introduce myself: I am Antonio
Pino Robles—an Electronic Engineering student from the
Basque Country—and I will be improving matrix functions in <a href="http://www.gnu.org/software/octave/">GNU Octave</a> this
summer, following <a href="https://developers.google.com/open-source/soc/?csw=1">Google Summer of Code</a> program.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The idea behind this is quite simple: given a
square matrix $M\in \mathbb{C}^{n \times n}$ and a function $f$, GNU Octave will compute
$f\left(M\right)$. You may think of them as an extension to scalar functions, i.e. starting from $f:\mathbb{C}\rightarrow \mathbb{C}$ compute $f:\mathbb{C}^{n \times n}\rightarrow \mathbb{C}^{n \times n}$. Their implementation is quite different, though. (Check Golub and van Loan's book[0] and the Short Course by Higham and Lin[1] for further info.)</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Let me note that matrix functions are already part of octave: <a class="external text" href="http://hg.savannah.gnu.org/hgweb/octave/file/9a8be23d2c05/scripts/linear-algebra/expm.m" rel="nofollow">expm</a>, <a class="external text" href="http://hg.savannah.gnu.org/hgweb/octave/file/9a8be23d2c05/scripts/linear-algebra/logm.m" rel="nofollow">logm</a>, <a class="external text" href="http://hg.savannah.gnu.org/hgweb/octave/file/9a8be23d2c05/libinterp/corefcn/sqrtm.cc" rel="nofollow">sqrtm</a> in octave itself and <a class="external text" href="http://sourceforge.net/p/octave/linear-algebra/ci/default/tree/inst/funm.m" rel="nofollow">funm</a>, <a class="external text" href="http://sourceforge.net/p/octave/linear-algebra/ci/default/tree/inst/thfm.m" rel="nofollow">trigonometric and hyperbolic matrix functions</a> in the Linear-Algebra <a href="http://octave.sourceforge.net/">Octave-Forge</a> package. There are also GPLed toolboxes by Nicholas J. Higham, namely the mctoolbox[2] and the mftoolbox[3]; furthermore, GPLed software from the NAMF group—led by N. J. Higham at The University of Manchester—is available as well.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Hence, on a first part octave will be modified in order to run the toolboxes—as they are—smoothly , and then the existing implementations will be improved by means of updating their algorithms.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Finally, for a more detailed description of the project please refer to my octave-wiki page:</span><br />
<a href="http://wiki.octave.org/User:Antonio_Pino"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">http://wiki.octave.org/User:Antonio_Pino</span></a><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Agur bero bat! </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<hr />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">[0] G.H. Golub and C.F. Van Loan. Matrix Computations, 4th Edition. The Johns Hopkins University Press, Baltimore, USA, 2013.
</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">[1] <span class="citation"><span class="field_creators"><span class="person_name">Nicholas J. Higham</span> and <span class="person_name">Lin Lijing</span></span>, <a href="http://eprints.ma.man.ac.uk/2067/"><span class="field_title">Matrix Functions: A Short Course</span></a>, preprint, (<span class="field_date_issue">2013</span>).</span></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span class="citation">[2] </span><span class="citation">N. J. Higham. The Matrix Computation Toolbox.
<a href="http://www.ma.man.ac.uk/~higham/mctoolbox">http://www.ma.man.ac.uk/~higham/mctoolbox</a></span></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span class="citation">[3] </span>N. J. Higham. The Matrix Function Toolbox.
<a href="http://www.ma.man.ac.uk/~higham/mftoolbox">http://www.ma.man.ac.uk/~higham/mftoolbox</a></span>Antonio Pino Robleshttp://www.blogger.com/profile/11280316372713175482noreply@blogger.com0