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 call member function of class in another m file in matlab?
Replies: 1   Last Post: Aug 12, 2014 12:52 PM

Advanced Search

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

Posts: 1,069
Registered: 9/26/13
Re: How to call member function of class in another m file in matlab?
Posted: Aug 12, 2014 12:52 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


"foozhan " <hani.hasani@yahoo.com> wrote in message
news:lrve3a$gu7$1@newscl01ah.mathworks.com...
> How can call class function,and initialize object of class in another
> file.m , when calling from command window its work but I wanna call
> function from m file.
>
> i have folder:@myClassName.


If it's a static method, use the class name.
If it's an instance ("ordinary") method, construct an instance of the class
then pass that instance as one of the inputs to the method.

http://www.mathworks.com/help/matlab/methods-defining-operations.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.