0001 0002 function v = plus(v1,v2) 0003 0004 if ~strcmp(char(v1), char(v2)) 0005 error('### Can''t add different units'); 0006 end 0007 0008 v = v1; 0009 0010 end