comparison m-toolbox/classes/@unit/setVals.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % SETVALS set the vals field of the unit
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: SETVALS set the vals field of the unit.
5 %
6 % CALL: a = a.setVals(vals)
7 %
8 % VERSION: $Id: setVals.m,v 1.3 2011/04/08 08:56:35 hewitson Exp $
9 %
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 function u = setVals(u, v)
13
14 if numel(v) ~= numel(u.vals)
15 error('### Can''t change the number of elements in <vals>.');
16 end
17
18 u.vals = v;
19
20 end