类型不完整的Matlab平等支持

Nor*_*löw 3 comparison matlab types

为什么我不能比较特定类型,如函数句柄,使用==Matlab中的操作?

例如

@prod == @sum
Run Code Online (Sandbox Code Playgroud)

失败,错误

Undefined function 'eq' for input arguments of type 'function_handle'.
Run Code Online (Sandbox Code Playgroud)

如果我们只==function_handle类型指定重载,这是否意味着此类型可以支持比较?

b3.*_*b3. 6

要测试函数句柄的相等性,请使用ISEQUAL命令:

>> isequal(@prod, @sum)

ans =

     0

>> isequal(@prod, @prod)

ans =

     1