File Exchange

image thumbnail

calnum_sf - Solve with Fixed Significant Digits

version 1.0.1 (2.68 KB) by Mohammad Al-Fetyani
calnum_sf solves mathematical expression with fixed significant figures.

0 Downloads

Updated 17 Apr 2019

View License

% calnum_sf solves mathematical expression with fixed significant figures
% ---------------------------------------------------------------------
% inputs
% expression - your expression as a string
% numSF - number of significant figures
% method - uses following methods for rounding:
% 'round'
% 'fix'
% ---------------------------------------------------------------------
% outputx
% appVal the approximate result
% error the relative error
% ---------------------------------------------------------------------
% example
% [num,error]=calnum_sf('(2/9)*(9/7)*3-5*66*cos(log(3*5)-5)+3.5464*cos(6*sin(3)/5)^5',6,'round')
%
% All copyrights goes to Mohammad Al-Fetyani
% University of Jordan

Cite As

Mohammad Al-Fetyani (2020). calnum_sf - Solve with Fixed Significant Digits (https://www.mathworks.com/matlabcentral/fileexchange/69859-calnum_sf-solve-with-fixed-significant-digits), MATLAB Central File Exchange. Retrieved .

François Beauducel (2015). Round with significant digits (https://www.mathworks.com/matlabcentral/fileexchange/26212-round-with-significant-digits), MATLAB Central File Exchange. Retrieved 03 Apr 2015.

Comments and Ratings (2)

Updates

1.0.1

name fixed

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags