函数句柄
>> myhandle=@cos
myhandle =
@cos
>> x=[-1:0.1:1]
>> plot([-1:0.1:1],myhandle(x))
匿名函数
>> fhandle=@(x,y) x+y
fhandle =
@(x,y)x+y
>> fhandle(1,5)
ans =
6
>>
函数句柄
>> myhandle=@cos
myhandle =
@cos
>> x=[-1:0.1:1]
>> plot([-1:0.1:1],myhandle(x))
匿名函数
>> fhandle=@(x,y) x+y
fhandle =
@(x,y)x+y
>> fhandle(1,5)
ans =
6
>>