I'm looking to save the workspace from a method of a class. Using just 'save(filename)' it saves only the object. Is there a way to save the entiere workspace from a class?
classdef DataFile properties filename end methods function self=DataFile(filename) % creator
self.filename=filename; end function save(self) %save the current workspace
save([self.filename, '.mat']); end endend
Best Answer