how to split a number?

3 views (last 30 days)
Paromita Bhattacharjee
Paromita Bhattacharjee on 30 Aug 2015
Commented: Walter Roberson on 30 Aug 2015
I have a number a=2.3*10^5, I want to separate 2.3 and 10^5 as two different data value. How do I do it? please help

Accepted Answer

Stephen23
Stephen23 on 30 Aug 2015
>> x = 2.3*10^5;
>> y = 10^floor(log10(x))
y =
100000
>> z = x/y
z =
2.3
  1 Comment
Walter Roberson
Walter Roberson on 30 Aug 2015
Watch out for negative numbers and watch out for 0.

Sign in to comment.

More Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!