On 'Publishing' mathematical equations using MATLAB

1 view (last 30 days)

I am at a loss to understand the publishing of mathematical equations using MATLAB for which you can use 'publish' command. I tried the following LATEX code in publish and got 'mixed' results. Some equations were recognized and published and some resulted in gibberish.

Also another problem I find is that inline Latex is misaligned (is raised above or below the adjacent text slightly) making it look abnormal.

May be I have to know better how to use this feature or may be MATLAB has to be improved!

%% 
% $$\frac{\mathrm{d}}{\mathrm{d}x}\arcsin x=\frac{1}{\sqrt{1-x^2}}$$
%% 
% Let $\arcsin( \frac{1}{2} \sqrt{2-\sqrt {2-x}})=y$ 
% $\implies-\dfrac\pi2\le y\le\dfrac\pi2$
% and $\dfrac12\sqrt{2-\sqrt {2-x}}=\sin y$
% $\implies2-\sqrt {2-x}=(2\sin y)^2$
% Using $\cos2A=2\cos^2A-1=1-2\sin^2A,$
% $\sqrt {2-x}=2-4\sin^2y=2\cos2y$
% $\implies x=2-(2\cos2y)^2=-2\cos4y$
% $\implies\cos4y=-\dfrac x2$
% $\arccos\left(-\dfrac x2\right)=\begin{cases}2\pi+4y  &\mbox{if }
% -2\pi\le4y<-\pi \\-4y &\mbox{if }  -\pi\le4y<0\\ 4y &\mbox{if } 0\le4y\le\pi \\ 2\pi-4y & \mbox{if }\pi<4y\le2\pi \end{cases}$
  1 Comment
Seetha Rama Raju Sanapala
Seetha Rama Raju Sanapala on 25 Nov 2015
@Walter Roberson, Thanks for the editing. I am not confident of my LATEX knowledge, I copy and pasted some code from math.stackexchange. Some code was recognised, but some code resulted in error messages.

Sign in to comment.

Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!