hello, actually what i wanted to know is: if i have a number like 0.6543e+013. Now i just need 0.6543.so i need to divide by 10^the power.but i cant understand how to find this value of power.Is there any function available in matlab that can give me my value...?
Thank you, Ekta

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 6월 22일
편집: Azzi Abdelmalek 2013년 6월 22일

0 개 추천

a=0.6543e+013
power=ceil(log10(a)-1)
b=10^(log10(a)-power)
% the result b is always between 1 and 10, if you want the result to be between 0 and 1 add
power=power+1
b=b/10

추가 답변 (2개)

Andrei Bobrov
Andrei Bobrov 2013년 6월 22일

0 개 추천

x = 0.6543e+013
x*10^-ceil(log10(x))
Jan
Jan 2013년 6월 23일

0 개 추천

What is the wanted result for:
123.456
0.0000000000123

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by