How to convert the scientific notation to standard form

21 visualizzazioni (ultimi 30 giorni)
Hi all, I am trying to convert the y-axis numbers from scientific notation to standard form. Below is the commands that I used, please see plot which I've attached: x=linspace(-10,10,200);
y=sin(4*x)./exp(x);
plot(x,y)
Thank you very much :)

Risposta accettata

Walter Roberson
Walter Roberson il 8 Gen 2016
If you are using R2014b or newer then I understand there are new facilities to control this.
For R2014a or earlier, you need to set the axes YTickLabel property yourself. For example,
curYTick = get(gca,'YTick');
YLabel = cellstr( num2str( curTick(:), '%f') );
set(gca, 'YTickLabel', YLabel);
Adjust the %f format code as needed.

Più risposte (0)

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by