تبلیغات
مهندسی مکانیک و هوافضا - مطالب ابر Greek Letters and Special Characters in Graph Text

Create a simple line plot and add a title to the graph. Include the Greek letter  in the title by using the TeX markup \pi.

x = linspace(0,2*pi); y = sin(x); plot(x,y) title('x ranges from 0 to 2\pi') 

### Include Superscripts and Annotations in Graph Text

Create a line plot and add a title and axis labels to the graph. Display a superscript in the title using the ^ character. The ^ character modifies the character immediately following it. Include multiple characters in the superscript by enclosing them in curly braces {}. Include the Greek letters  and  in the text using the TeX markups \alpha and \mu, respectively.

t = 1:900; y = 0.25*exp(-0.005*t); figure plot(t,y) title('Ae^{\alphat} for A = 0.25 and \alpha = -0.0005') xlabel('Time \musec') ylabel('Amplitude') 

Add text at the data point where t = 300. Use the TeX markup \bullet to add a marker to the specified point and use \leftarrow to include an arrow pointing to the left. By default, the specified data point is to the left of the text.

txt = '\bullet \leftarrow 0.25t e^{-0.005t} at t = 300'; text(t(300),y(300),txt) 

ادامه مطلب

مرتبط با: متلب ( MATLAB ) ,