SUNY Geneseo Department of Mathematics
Friday, April 22
Math 304
Spring 2016
Prof. Doug Baldwin
>> % @ in Matlab is roughly equivalent to lambda
>> @(y) @(z)y
ans =
@(y)@(z)y
>> f=ans
f =
@(y)@(z)y
>> g=f(3)
g =
@(z)y
>> g(0)
ans =
3
>> g(1)
ans =
3
>> g(-1001)
ans =
3
>> always3 = g
always3 =
@(z)y
>> always3(17)
ans =
3
>> always5 = f(5)
>> always5 =
@(z)y
>> always5(1)
ans =
5