In command mode, MATLAB displays a prompt
≫ 2+2
≫ 5^2
≫ 2*sin(pi/4)
The variable pi = 3.14 is built into MATLAB, as are the sin function and
hundreds of other functions. When you entered each of the preceding lines,
MATLAB stored the results in a variable called ans for answer. The value of
ans was then displayed. The last line should have produced the square root
of 2. We can manipulate ans to find out
≫ ans^2
The new answer is very close to 2, as expected. Let's see what the roundoff error is:
≫ ans-2
"Reviewer's Comments: 'I recommend this book as a "required primary textbook." This text attempts to lower the barriers for students that take courses such as Principles of Electrical Engineering, […]"