generate random numbers in engineering notation with precision
Show older comments
Matlab folks,
I have a simple question: I want to generate a vector of random numbers formatted in engineering format (e-notation) and the precision is x.xxxxExx
The precision is what is causing me trouble especially is that my goal is to generate a vector of these
Thanks
Accepted Answer
More Answers (2)
Rick Rosson
on 11 Jan 2013
0 votes
1 Comment
Mike Sirwood
on 11 Jan 2013
Daniel Shub
on 11 Jan 2013
0 votes
What do you mean by format? Computers tend to work with integers and floats, with floats coming in single and double precision varieties. They are internally represented as a sequence of 0's and 1's and many programs can externally display them in a variety of formats (binary, hex, decimal, engineering, etc). MATLAB by default uses double precision floats, but you can switch to single precision or integers. The format in which the number is displayed is controlled by the FORMAT function, but this has no effect on the internal representation.
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!