Added matlab object saving #10

Merged
merged 1 commit into from Sep 30, 2015

Projects

None yet

2 participants

@sertansenturk
Contributor

Since many people incorporate MATLAB classes, it would be useful to support saving the (public) properties of matlab objects.

The code is tested for empty object, i.e. numel(obj) == 0; vector of objects. Currently, the code flattens 2D or higher dimensional array of objects to a vector.

@fangq fangq merged commit 57d4523 into fangq:master Sep 30, 2015
@fangq
Owner
fangq commented Sep 30, 2015

thank you Sertan! people had requested this feature before.
your patch is in upstream now.

have you tested this with octave?

@sertansenturk
Contributor

No problem, I'm happy that I am able to contribute :)

I have not tested it with Octave, sorry. This might not also work on earlier versions of MATLAB (< 2007-2008), where class syntax was different as far as I know.

Also, it might be good to add this capability to saveubjson.m too. I didn't want to change it before the initial pull request was revised.

@fangq
Owner
fangq commented Sep 30, 2015

I have not tested it with Octave, sorry. This might not also work on earlier versions of MATLAB (< 2007-2008), where class syntax was different as far as I know.

it would be nice to use the existing "isoct" variable or opt.IsOctave field in the savejson to test for octave.

Also, it might be good to add this capability to saveubjson.m too.

that would be nice too

@sertansenturk
Contributor

Ok, I'll make another pull request for saveubjson.m later this week. For octave, it might take a couple of more days...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment