Trefethen & Bau & MATLAB & Julia: Iterative methods

I’m going to wrap up the long-paused MATLAB versus Julia comparison on Trefethen & Bau by chugging through all the lectures on iterative methods in one post. I’m back to using gists–not thrilled with any of the mechanisms for sharing this stuff.

Trefethen & Bau & MATLAB & Julia, Lectures 24-29: Eigenvalue stuff

Part V of T&B is on dense methods for eigenvalue and singular value problems. For my course, this is the part of the text that I condense most severely. In part that’s due to the need to cover unconstrained nonlinear solving and optimization stuff later on.

Trefethen & Bau & MATLAB & Julia: Lecture 19, Stability of least squares

Here are the notebooks in MATLAB and Julia. The new wrinkle in these codes is extended precision. In MATLAB you need to have the Symbolic Math toolbox to do this in the form of vpa.

Trefethen & Bau & MATLAB & Julia, Lecture 8: Gram-Schmidt

This lecture is about the modified Gram-Schmidt method and flop counting. The notebooks are here. I’m lost. Almost as an afterthought I decided to add a demonstration of the timing of Gram-Schmidt compared to the asymptotic flop count.

Trefethen & Bau & MATLAB & Julia, Lecture 4: SVD

The notebooks: matlab and julia. Today is about some little conveniences/quirks in Julia. Starting here: t = linspace(0,2*pi,300); x1,x2 = (cos(t),sin(t)); The second line assigns to two variables simultaneously. It’s totally unnecessary here, but it helps to emphasize how the quantities are related.

Trefethen & Bau & MATLAB & Julia, Lecture 3: Norms

Here are the MATLAB and julia notebooks. The big issue this time around was graphics. This topic dramatically illustrates the advantages on both sides of the commercial/open source fence. On the MATLAB side, it’s perfectly clear what you should do.

Trefethen & Bau & MATLAB & Julia, Lecture 2

Here are the matlab and julia notebooks. Two things stood out this time. First, consider the following snippet. u = [ 4; -1; 2+2im ] v = [ -1; 1im; 1 ] println("dot(u,v) gives ", dot(u,v)) println("u'*v gives ",u'*v) The result is

Trefethen & Bau, via MATLAB and Julia

This semester I’m teaching MATH 612, which is numerical linear and nonlinear algebra for grad students. Linear algebra dominates the course, and for that I’m following the now classic textbook by Trefethen & Bau.

Why not Zoidberg?

Something fun for Friday? My older son binge-watched Futurama on Netflix a few months ago. This was one of the funniest shows of at least recent TV history. Especially if you like nerdy, cultural-reference, rapid-fire style humor like a real Gen-Xer.

Data science? Data science!

I just received a copy of SIAM News on a dead tree. It features a piece by Chris Johnson and Hans de Sterck about “Data Science: What Is It and How Is It Taught?