SUNY Geneseo Department of Mathematics
Monday, October 20
Math 230 01
Fall 2014
Prof. Doug Baldwin
f(....)
calls (i.e., runs) function@f
produces a handle to function>> x = sqrt(4)
x =
2
>> y = sqrt
Error using sqrt
Not enough input arguments.
>> z = @sqrt
z =
@sqrt
>> z(9)
ans =
3
>> riemann2( @sqrt, 0, 10, 100 )
ans =
20.9173
>> r = @riemann2
r =
@riemann2
>> @(x)x^4
ans =
@(x)x^4
>> ans(8)
ans =
4096