Invoking MATLAB class constructor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Invoking MATLAB class constructor

Colin Kikuchi
Hello,
I am trying to adapt a program called MAxSym, developed in MATLAB, to run in Octave. Part of the program involves calling a class to create an object. For example I am attaching 'Model.m', which is how you create the object.

I have looked through some of the online Octave documentation and can't determine whether this is supported in Octave, and if so, what is the correct syntax that I should use to invoke the class constructor?

Thank you!

-Colin



Model.m (49K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Invoking MATLAB class constructor

siko1056
On Mon, Dec 17, 2018 at 11:02 PM Colin Kikuchi <[hidden email]> wrote:
Hello,
I am trying to adapt a program called MAxSym, developed in MATLAB, to run in Octave. Part of the program involves calling a class to create an object. For example I am attaching 'Model.m', which is how you create the object.

I have looked through some of the online Octave documentation and can't determine whether this is supported in Octave, and if so, what is the correct syntax that I should use to invoke the class constructor?

Thank you!

-Colin


Dear Colin,

The Octave and Matlab syntax to create an object of your class "Model" is:

   >> obj = Model()

but as your class "Model" is derived from the class "Check" from the package "MAxSym", Octave complains that is has no such class definition:

   error: class not found: MAxSym.Check


What Octave supports about classdef classes is documented here:


and here:


If you face further problems you can as for specific problems or error messages you get.

HTH,
Kai