— Cleve ]]>

I’ve noticed the “Get the MATLAB code” link at the foot of Cleve’s blog posts no longer works; it doesn’t “Get the MATLAB code” when clicked.

The problem seems to have been introduced between the May 23rd “Modernization of Numerical Integration” post and the June 9th “Math and Music” post. The link works in the May 23rd post, but doesn’t work in the June 9th post.

The formatting of the “Published with MATLAB R2016a” line gives a clue. On working pages it’s displayed in a small, light gray font. On faulty pages it’s displayed as regular text.

One thing I notice is a slight difference in the JavaScript `grabCode_…()` function between working and non-working pages. There are spurious line breaks in string literals in the JavaScript of the faulty pages.

In working pages the JavaScript contains

d.write('<pre>\n'); ... d.write('</pre>\n');

with no line break in the string literals, ‘<pre>\n’ and ‘</pre>\n’.

In faulty pages the javascript contains

d.write(' <pre>\n'); ... d.write('</pre> \n');

with line breaks in the string literals. JavaScript normally requires a backslash (\) when breaking a string literal across lines.

Duncan

]]>Thanks for writing the article on Jim; it was great catching up on what he’s been doing.

After getting his PhD from UNM, Jim worked in Los Alamos with Al Carasso and me on using PDEs for deburring images. He was a coauthor of what is probably the first paper using evolutionary PDEs for image enhancement

http://epubs.siam.org/doi/abs/10.1137/0715023

Mac

]]>

https://www.mathjax.org/

The creation of such a stylesheet is described in MATLAB Answers.

https://www.mathworks.com/matlabcentral/answers/93851-how-can-i-use-mathjax-to-render-the-latex-math-in-the-published-output-in-matlab-7-10-r2010a

— Cleve

(Google: “matlab answers mathjax”)

]]>Thank you for an interesting post. I have a question regarding the publishing of MATLAB scripts with math. When I publish a script, following the instructions in the documentation, the result looks not nearly as nice as the math in your blog. Inline and display equations are both low resolution images and are not quite perfectly aligned with the text. Are there extra settings or templates that you can share that will make math in published MATLAB scripts look nicer?

I posted the same question in Answers as well, as it might be of interest to others too.

http://www.mathworks.com/matlabcentral/answers/298325-how-to-make-published-html-look-as-good-as-the-blogs-on-matlab-central

Thanks,

-naor ]]>

syms x a1 a2 a3 a4

n = 3;

P = a1*x^3 + a2*x^2 + a3*x + a4;

expand((-1)^n*subs(P,x,sqrt(x))*subs(P,x,-sqrt(x)))

ans =

a1^2*x^3 + 2*a1*a3*x^2 – a2^2*x^2 – 2*a2*a4*x + a3^2*x – a4^2

I suppose after each iteration, you could scale the coefficients so the leading coefficient is 1, but one would naturally do that before iteration 1, so the leading coefficient would never change from 1.

The interesting questions are how to resolve the problem when the root of largest magnitude is a complex conjugate pair, or what happens with multiple roots, etc.

]]>— Cleve ]]>