Matlab Tricks(十七)—— 使用 Latex

>> set(text, 'Interpreter')
'none'
'tex'
'latex'
            % Matlab将返回'Interpreter'(解释器,对 text 文本的解释)所包含的属性值:
  • 1、 在图象中直接加字符,很简单。

    text('Interpreter','latex','String','$$sqrt{x^2+y^2}$$','Position',[.5.5],… 'FontSize',16);
  • 2、在legend里加数学字符

    h = legend('$$sqrt{x^2+y^2}$$');
    set(h, 'Interpreter', 'latex')

Matlab 中巧用 LaTex

原文地址:https://www.cnblogs.com/mtcnn/p/9423048.html