Skip to Main Content
Programming in MATLAB ®: A Problem-Solving Approach by Pearson
book

Programming in MATLAB ®: A Problem-Solving Approach by Pearson

by Ram N. Patel, Ankush Mittal
May 2024
Intermediate to advanced content levelIntermediate to advanced
433 pages
13h 7m
English
Pearson India
Content preview from Programming in MATLAB ®: A Problem-Solving Approach by Pearson
Propagated Errors É 289
fprintf(‘The machine epsilon would be close to %d’, m_eps)
end
Machine epsilon is the smallest number one can add to unity and still be able to detect
it. In MATLAB, machine epsilon is the predefined variable eps. Thus, for any general
number a and b,
()
aa
ba =
, if b < eps. Following is the output of this code:
>> mac_eps
1 + 2^-48 does not equal 1
1 + 2^-49 does not equal 1
1 + 2^-50 does not equal 1
1 + 2^-51 does not equal 1
1 + 2^-52 does not equal 1
1 + 2^-53 equals 1
1 + 2^-54 equals 1
The machine epsilon would be close to 2.220446e - 016
In this code eps is approximated to 2
-52
as it is possible to detect this number after ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Applied Numerical Methods Using MATLAB, 2nd Edition

Applied Numerical Methods Using MATLAB, 2nd Edition

Won Y. Yang, Wenwu Cao, Jaekwon Kim, Kyung W. Park, Ho-Hyun Park, Jingon Joung, Jong-Suk Ro, Han L. Lee, Cheol-Ho Hong, Taeho Im
MATLAB Recipes: A Problem-Solution Approach

MATLAB Recipes: A Problem-Solution Approach

Michael Paluszek, Stephanie Thomas
Practical MATLAB Deep Learning: A Projects-Based Approach

Practical MATLAB Deep Learning: A Projects-Based Approach

Michael Paluszek, Stephanie Thomas, Eric Ham

Publisher Resources

ISBN: 9781306983440Publisher Website