Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How to check if a variable is a function handle?
Replies: 4   Last Post: Jul 18, 2013 9:38 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: How to check if a variable is a function handle?
Posted: Jul 18, 2013 9:38 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Rui" <rui.maciel@gmail.com> wrote in message
news:a963190d-2b2b-42d6-8dae-c6ebd99bc0e4@googlegroups.com...
> Quinta-feira, 18 de Julho de 2013 11:30:14 UTC+1, Jos (10584) escreveu:
>> Rui wrote in message
>> <6df3a965-3753-49f4-b791-1e74e7e31945@googlegroups.com>...
>>

>> > Is there a way to check if variable is a function handle? I couldn't
>> > find any reference on Mathworks' is* page[1].


*snip*

> Thanks for the help, Jos.
>
> As a future reference, this property is implicitly defined in Mathwork's
> page on the isa() function [1], with the 'function_handle' label being
> included in the 'MATLAB fundamental types' section.


It's not a property, it's the class of the variable. You can confirm this
using:

f = @sin;
whos f

or by looking in the Tips section of this documentation page:

http://www.mathworks.com/help/matlab/ref/function_handle.html

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.