version (1.41 KB) by Charlie Hogg
rounds a number to a specified number of significant figures


Updated 6 Dec 2013

View License

% A function to round val to sigfig significant figures. Trailing zeros to
% the right of the decimal point are not retained.

Cite As

Charlie Hogg (2022). round_to_sigfig (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!