Matlab - how to put an exponent in xlabel

Asked

Viewed 506 times

0

Good afternoon. I want to put on the xlabel the units of m (-1).

f=[40.82,52.63,75.80];
inversoL=[1/0.730,1/0.600,1/0.400];
coeficientes=polyfit(inversoL,f,1)
f_est=coeficientes(1).*inversoL+coeficientes(2);
plot(inversoL,f,'kd-');
hold on;
plot(inversoL,f_est, 'ro-');
title('Frequência em função do inverso do comprimento da corda','FontSize', 16); 
xlabel('Inverso do comprimento da corda m^(-1)','FontSize', 16,'Color','k');

The problem is that only the curved parenthesis is in exponent, and I wanted to use the units of the inverse meter or m (-1). Thank you to all who can help.

1 answer

0


I already found the solution. The code is the same, only this line is changed:

xlabel('Inverso do comprimento da corda m^{-1}','FontSize', 16,'Color','k');

Browser other questions tagged

You are not signed in. Login or sign up in order to post.