Monthly Archives: July 2014

Least Squares in Euler Math Toolbox

For an over-determined linear system expressed in matrix form, the matrix A has more rows than columns.  Therefore the inverse of A cannot be found. The trick with least squares is to multiply both sides of the equation by transpose of A and then solve.  This makes the matrix square and invertible.  In Matlab the back slash operator will do matrix division, and if the matrix is over determined, it will attempt to do least squares.

So for the equation Ax = b, Matlab will give the least squares solution:

x = A\b

In Euler Math Toolbox (EMT) A\b will only work for invertible matrices.  So for EMT to do least squares I need to do the extra steps:

x = (A’.A)\(A’.b)

Rightmost points of the Mandelbrot Set

Using Euler Math Toolbox with the plotting function given at the end of this article, I did a search for the rightmost points of the Mandelbrot sets.  My candidate for the rightmost points are in the neighborhood of 0.4708247 + i*0.3478550 (and its conjugate).  Not sure what the significance of those values is.

right-most points of mandelbrot set zoomed in

function Mandelbrot(a,b,c,d,n=500,m=100)
loop 1 to m
h = z + (h)^2;
return h;