Yes I was able to concatenate all the functions I needed in one file and run it (for some reason the 'eq' function doesn't seem to work). But there seems to be another problem, matlab coder won't work with cell arrays so I guess I am out of luck. But thanks any way.
In theory nothing prevents you from concatenating all the methods file in the class main file, inside a 'methods' block. Except that it would make the code completely unreadable and unmaintainable. I did this mistake once for another contribution (the msdanalyzer) and won't do it again.
Hi Jean-Yves, I am trying to compile my project using matlab coder and it is returning error "Cannot load '.../tree/@tree/tree.m' because code generation does not support classes and enumerations in @-directories." So the problem seems to be the @-directory which is needed for a multi-file class definition. Would you have any idea how to convert it into a single file class def?
Hi Jean-Yves, thanks that was very helpful. Btw is your implementation going to be more efficient than isequal because currently its taking a big chunk of my computation. If its faster it would save a lot of time for me.
Indeed, to compare the equality between two matrices, we would need the isequal method to be implemented.
This is not the case for @tree right now; I will do it for the next release.
In the meantime, you would have to do something like
>> cellfun(@(x) isequal(x, a), t.Node )