double2estr¶
- double2estr(val, tol)
DOUBLE2ESTR Convert a double to a string as a simple fraction times an exponential
- Usage:
e_str = double2estr(val) e_str = double2estr(val, tol)
- Inputs:
val : double - the value to convert – required tol : double - closeness tolerance for simple fraction match (default: 1e-10)
- Outputs:
e_str : char - string representation as ‘n/d * exp(b)’, or ‘’ if no match
Example
e_str = double2estr(2/4*exp(5)); % returns ‘1/2 * exp(5)’ e_str = double2estr(4.7); % returns ‘’
See also: double2fracstr, double2pifracstr, double2expstr, value2str
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿