我想做的是在一个完整且单独的图中输出数学公式(通过 LaTeX),专门用于数学方程,或者能够在命令窗口本身中显示数学方程(再次通过 LaTeX)。
这在 MATLAB 中可行吗?
谢谢!
我不确定命令提示符,但您可以使用text
.
例如,这个:
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);
应该给你这个:
我还建议你阅读这篇文章。这应该让你继续前进。
第一个可以使用 text 命令:
figure;
text(.1,.9,'\itAe^\alpha^t')
set(gca,'visible','off');
这是关于以这种方式使用 TeX/LaTeX的更完整的文档集。