time | Calls | line |
---|
| | 431 | function [dblFmt,snglFmt] = getFloatFormats()
|
| | 432 | % Display for double/single will follow 'format long/short g/e' or 'format bank'
|
| | 433 | % from the command window. 'format long/short' (no 'g/e') is not supported
|
| | 434 | % because it often needs to print a leading scale factor.
|
< 0.001 | 8 | 435 | switch lower(matlab.internal.display.format)
|
< 0.001 | 8 | 436 | case {'short' 'shortg' 'shorteng'}
|
< 0.001 | 8 | 437 | dblFmt = '%.5g ';
|
< 0.001 | 8 | 438 | snglFmt = '%.5g ';
|
| | 439 | case {'long' 'longg' 'longeng'}
|
| | 440 | dblFmt = '%.15g ';
|
| | 441 | snglFmt = '%.7g ';
|
| | 442 | case 'shorte'
|
| | 443 | dblFmt = '%.4e ';
|
| | 444 | snglFmt = '%.4e ';
|
| | 445 | case 'longe'
|
| | 446 | dblFmt = '%.14e ';
|
| | 447 | snglFmt = '%.6e ';
|
| | 448 | case 'bank'
|
| | 449 | dblFmt = '%.2f ';
|
| | 450 | snglFmt = '%.2f ';
|
| | 451 | otherwise % rat, hex, + fall back to shortg
|
| | 452 | dblFmt = '%.5g ';
|
| | 453 | snglFmt = '%.5g ';
|
< 0.001 | 8 | 454 | end
|
< 0.001 | 8 | 455 | end
|
Other subfunctions in this file are not included in this listing.