Entering power in MATLAB title
조회 수: 88 (최근 30일)
이전 댓글 표시
I wanted to write e^(-1000|t|) in matlab title of a plot. When I entered this and ran it actually, it showed ( as a superscript and every thing else in the line in regular font. Now I wanted the whole thing -1000|t| to appear as a superscript. I tried bracketing etc and finally I achieved what I wanted by inserting ^ before every letter. Is there a better way?
댓글 수: 0
채택된 답변
Stephen23
2015년 5월 1일
편집: Stephen23
2015년 5월 1일
The text in a title can be formatted using TeX or LaTeX markup, which means you need to group characters with curly brackets, not parentheses. Something like this:
title('e^{-1000|t|}')
which produces
The markup selection is named in the documentation as the Interpreter, and it clearly describes the three options (LaTeX, TeX, none). There is also an example showing how grouping is achieved (search for "Include Greek Symbols in Title"):
This is a very good introduction on how to write LaTeX expressions:
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!