How to add an eguation into my plot?

Hi,
I have plotted my data but I need to add an equation in a textbox near to the lines in my plot. The textbox in the Insert seems to be not suitable as I need to use some symbols like gamma, tetha, alfa etc in the equation and these symbols are not available there. Or maybe I am wrong.
Any advice is appreciated much.

Answers (2)

you can use the annotation command. e.g.
annotation('textbox',[0.1 0.1 0.1 0.1],'String','hello $\frac{2}{4} \alpha$ ','FitBoxToText','on','Interpreter','latex');
there you have any latex command available if you wish. or you use tex as interpreter
You can text() a label into position, and you can set the Interpreter property of the text() object to 'latex'

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Tags

Asked:

on 21 Apr 2021

Answered:

on 21 Apr 2021

Community Treasure Hunt

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

Start Hunting!