This commit is contained in:
Ingy döt Net 2013-04-10 15:42:53 -07:00
parent 051504d65b
commit 0457928c3e
295 changed files with 3588 additions and 3 deletions

View file

@ -0,0 +1,28 @@
classdef GenericClass2
properties
classVariable
end %properties
methods
%Class constructor
function objectInstance = GenericClass2(varargin)
if isempty(varargin) %No input arguments
objectInstance.classVariable = 0;
else
objectInstance.classVariable = varargin{1};
end
end
%Set function
function setValue(GenericClassInstance,newValue)
GenericClassInstance.classVariable = newValue;
%MATLAB magic that changes the object in the scope that called
%this set function.
assignin('caller',inputname(1),GenericClassInstance);
end
end %methods
end