|
Robochameleon
v1.0
|
Formats a number for printing using SI prefixes. More...
Go to the source code of this file.
Functions | |
| function | formatPrefixSI (in x, in numspec, in unitspec, in base, in nonSI) |
| Formats a number for printing using SI prefixes. More... | |
Formats a number for printing using SI prefixes.
Finds the most appropriate SI prefix to use given an arbitrary input number.
Definition in file formatPrefixSI.m.
| function formatPrefixSI | ( | in | x, |
| in | numspec, | ||
| in | unitspec, | ||
| in | base, | ||
| in | nonSI | ||
| ) |
Formats a number for printing using SI prefixes.
Finds the most appropriate SI prefix to use given an arbitrary input number.
| x | Input number to be formatted |
| numspec | Number format specification [string] [Default: '%1.2f'] |
| unitspec | String representing physical quantity. [e.g. 'W'] [Default: empty] |
| base | Base for numbering system [Default: 10] |
| nonSI | Flag to enable non-traditional unit. Bypasses rounding to nearest power of 3. [optional][Default:false] |
| s | Output string |
| mantissa | Mantissa |
| factor | Power of 10 to multiply output by to get original value |
| unit | String with SI unit |
| exponent | Power of base corresponding to SI unit |
| prefix | String with SI prefix but not unit |
1.8.11