generate random numbers in engineering notation with precision
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (2)
Rick Rosson
am 11 Jan. 2013
0 Stimmen
1 Kommentar
Mike Sirwood
am 11 Jan. 2013
Daniel Shub
am 11 Jan. 2013
0 Stimmen
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.
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!