通过LaTeX在命令窗口或独立图中获得MATLAB和数学方程式? [英] MATLAB and Math Equations via LaTeX in command window or stand-alone plots?

查看:91
本文介绍了通过LaTeX在命令窗口或独立图中获得MATLAB和数学方程式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做的是在完整且单独的图中输出数学公式(通过LaTeX),专门用于数学方程式,或者能够在命令窗口本身中显示数学方程式(同样通过LaTeX).

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.

这在MATLAB中可行吗?

Is this possible in MATLAB?

谢谢!

推荐答案

我不确定命令提示符,但是您可以使用

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);

应该给你这个:

我还建议您阅读这篇文章.这应该可以帮助您.

I also suggest that you read this article. This should get you going.

这篇关于通过LaTeX在命令窗口或独立图中获得MATLAB和数学方程式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆