필터 지우기
필터 지우기

Converting X axis to Exponential values of 10^5

조회 수: 7 (최근 30일)
Anthony
Anthony 2011년 8월 22일
Please I have some set of 0-0.019999999999999998 values in a xaxis of a histogram. I want to convert"0.019999999999999998" to an exponential value
Thanks
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2011년 8월 22일
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer

댓글을 달려면 로그인하십시오.

답변 (1개)

the cyclist
the cyclist 2011년 8월 22일
Here are two different ways to achieve what you want:
x = 0.00001:0.00001:0.00005;
y = 1:5;
figure
plot(x,y)
set(gca,'xtick',[0.00001:0.00001:0.00005])
set(gca,'xticklabel',{'1e-5','2e-5','3e-5','4e-5','5e-5'})
SCALE = 1.e-6;
figure
plot(x/SCALE,y)
xlabel('The x value [in units of 1.e-6]')
Putting the exponent in each tick label can take up a lot of space. In cases like yours, I prefer to pull the scale out, and put scale info into the label.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by