Entering power in MATLAB title

116 ビュー (過去 30 日間)
Seetha Rama Raju Sanapala
Seetha Rama Raju Sanapala 2015 年 5 月 1 日
編集済み: Stephen23 2015 年 5 月 1 日
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?

採用された回答

Stephen23
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 件)

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by