Significant Figures
Workaround for fprintf/sprintf to produce correct output for signficant figures, as fprintf/sprintf
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Cite As
Teck Por Lim (2026). Significant Figures (https://www.mathworks.com/matlabcentral/fileexchange/10669-significant-figures), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.8.0 (2.63 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.8.0 | Support for Inf and -Inf |
||
| 1.6.0 | Allowed default nargin < 2 to mean number of significant figures = 3
|
||
| 1.5.0 | Updated description. |
||
| 1.4.0 | Fixed bug with sigfig(99.9999,2).
|
||
| 1.3.0 | Bug fixed. |
||
| 1.0.0 | To enable sigfig(nan) |