IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
copy_obj.m
Go to the documentation of this file.
1 %> @file
2 %>@ingroup misc
3 %>@brief Shallow copy of object.
4 function o2 = copy_obj(o)
5 pp = properties(o);
6 o2 = eval(class(o));
7 for i = 1:length(pp)
8  o2.(pp{i}) = o.(pp{i});
9 end;
function copy_obj(in o)