Jdruiter
Jdruiter

Reputation: 355

How to port classregtree from Matlab to Octave?

For a project, I have to make Matlab's classregtree work in Octave.

According to the docs, it is not ported yet.

I am thinking of doing it, but matlab's classregtree is a class (object oriented) with properties and methods, and I have no idea how to get this written in Octave.

Did somebody port it already? Or how do I define classes in octave (with properties and methods)?

Upvotes: 2

Views: 667

Answers (1)

carandraug
carandraug

Reputation: 13091

You can implement classregtree with what is now called the "old-style matlab classes". In this style, all methods are simple Octave function files within a @class-name directory. The constructor is a function file with the same name as the class.

See the documentation on the Octave manual.

Also, that function seems to be deprecated in Matlab, and they recommend use of fitctree or fitrtree which will probably require classdef. You could ask your teacher about building Octave development from source and write the new version ;)

Upvotes: 1

Related Questions