Reputation: 3011
What I would like to do is have math formula output (via LaTeX) in either a complete and separate plot, solely devoted to math equations, or be able to display math equations (again via LaTeX) in the command window itself.
Is this possible in MATLAB?
Thanks!
Upvotes: 2
Views: 5940
Reputation: 32930
I'm not sure about the command prompt, but you can add LaTex text to MATLAB plots using text
.
For example, this:
figure
set(gcf, 'color', 'white'), axis off %# Remove axes and set white background
my_text = '$$f_n={x \over \sqrt{2}}$$';
text('units', 'inch', 'position', [-0.5 3.5], 'fontsize', 14, 'color', 'k', ...
'interpreter', 'latex', 'string', my_text);
should give you this:
I also suggest that you read this article. This should get you going.
Upvotes: 5
Reputation: 752
The first is possible using the text command:
figure;
text(.1,.9,'\itAe^\alpha^t')
set(gca,'visible','off');
Here is a more complete set of documentation on using TeX/LaTeX in this way.
Upvotes: 1