2. Write small pieces of matlab code to determine machine round-off on your comp
ID: 3890711 • Letter: 2
Question
2. Write small pieces of matlab code to determine machine round-off on your computer (to the nearest order of magnitude) b. a. the largest number that matlab can handle on your computer (to one significant digit) the smallest number (ie closest positive number to zero) that matlab can handle (again 1 significant digit -what we really want is the exponent) c. Show your work, including your code listing. Do NOT just use the built-in matlab functions that give these values -you should demonstrate that these are the appropriate values Note that what you see on the screen (the command window) is only shown to a few digits - this is NOT how many digits matlab is working with. You may want to use "format long" to see more digits but this is still just what is displayedExplanation / Answer
%This is done using 64 bit machine
b. Largest number that matlab can handle.
format long
realmax
%Answer: 1.797693134862316e+308
c. Smallest number that matlab can handle.
format long
realmin
%Answer: 2.225073858507201e-308
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.