Professional Documents
Culture Documents
3.) The sine of pi should be 0, but Matlab does not have a perfect definition of pi, so the sin(pi)
command returns a very small number close to zero, but not quite zero because of rounding error.
4.) NaN means not a number, and this was acquired by dividing by zero.
5.) The semicolon suppresses immediate output, and just checks to see if the statement ran. If it did, the
command window simply returns nothing. Not including the semicolon enables run-time output.
6.) X and Y are integers, meaning that they do not support decimals. The output is rounded to the
nearest integer, which in this case, 1.5 = the integer 2.