yamlmatlab
yamlmatlab copied to clipboard
uncommented comments and invalid imports in class def in the file DataTime.m
just found that the file license header is not properly commented, and lots of
import yaml.*
before every function defined in the DataTime class.
i am not sure this kinds of import is valid, but my Matlab R2016a complaints that this is not the valid syntax, may be it should be moved into the function definition.
I suspect that you are getting errors because the package is not on your path?
I had the same issue, solved it by adding the implementation of doFun:
methods (Access = private)
function this = doFun (this,o, val)
import yaml.*;
if isa(val,'DateTime') && isa(this,'DateTime')
this.serialDate=o(this.serialDate, val.serialDate);
elseif isa(val,'DateTime') && not(isa(this,'DateTime'))
val.serialDate=o(this, val.serialDate);
this = val;
elseif not(isa(val,'DateTime')) && (isa(this,'DateTime'))
this.serialDate=o(this.serialDate, val);
else
this.serialDate=DateTime(o(this, val));
end
end
end
end
Code is I think from here: https://github.com/ziyuw/rembo/blob/master/src/utils/yamlmatlab/DateTime.m