![]()
Module 5: Programming, Logic, Loops,Selection Statement/Apply
A pplying
this new MATLAB statement is an exciting endeavor. Our textbook provides several examples, which we can explore in lab on Wednesday, but for today I would like to examine a topic of fundamental importance to any computing. The limitations of Floating Point ArithmeticWe'll start with a Simplified model
How would you go about computing the properties of floating point arithmetic within the MATLAB environment on ROHAN?
I have coded up two example that I'd like you to look at in lab today. The first, explore_eps.m will use a for loop to compute a variety of texts to develop a basic understanding of how the computation might proceed. When exploring one does not always have a specific idea of what to expect, therefore we generate a lot of data.
Based on this exploration, we can write a simpler, more focussed MATLAB script unitround.m using the while loop, since we have a feeling for what sort of logical test will work. There are also diaries available showing the results of explore_eps and of running unitround.
Both of these scripts are available for you to run from the MATLAB window in lab today. We will continue with Reflect and Extend on Wednesday.
Page author: Dr. Kris Stewart
URL: http://www.stewart.cs.sdsu.edu/cs205/module /Apply.html
Last updated: , 1998