SUNY Geneseo Department of Mathematics
Wednesday, January 27
Math 230 02
Spring 2016
Prof. Doug Baldwin
name( argument )
>> format compact
>> diary jan27
>> clc
>> x = 1
x =
1
>> y = 17
y =
17
>> clear
>> x = 1
x =
1
>> y = 17
y =
17
>> clear x
>> angle = pi/6
angle =
0.5236
>> sin(angle)^2 + cos(angle)^2
ans =
1
>> sec(angle)^2 - tan(angle)^2
ans =
1
abs
function does and how to call it>> help abs
abs Absolute value.
abs(X) is the absolute value of the elements of X. When
X is complex, abs(X) is the complex modulus (magnitude) of
the elements of X.
See also sign, angle, unwrap, hypot.
Other functions named abs
Reference page in Help browser
doc abs
round
, floor
, ceil
>> round( 3.2 )
ans =
3
>> floor( 3.9 )
ans =
3
>> ceil( 3.1 )
ans =
4
atan
vs atan2
?>> atan( 1 )
ans =
0.7854
>> atan2( 1, 1 )
ans =
0.7854
>> atan2( -1, -1 )
ans =
-2.3562