Function to round variable to number of significant figures
Version 1.0.0.0 (12.2 KB) by
Niel
This function (or Simulink subsystem) rounds any variable to a given amount of significant figures.
This function can be incorporated into a Simulink model to round a variable to a predetermined number of significant figures. The constant at the bottom is n+1, where n is the number of significant figures required.
Cite As
Niel (2024). Function to round variable to number of significant figures (https://www.mathworks.com/matlabcentral/fileexchange/43143-function-to-round-variable-to-number-of-significant-figures), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2012b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |