comparison m-toolbox/classes/@data3D/getZ.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 % GETZ Get the property 'z'.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: Get the property 'z'.
5 %
6 % CALL: val = obj.getZ();
7 % val = obj.getZ(idx);
8 % val = obj.getZ(idx1, idx2);
9 % val = obj.getZ(1:10);
10 % val = obj.getZ(1,:);
11 %
12 % INPUTS: obj - must be a single data3D object.
13 % idx - index of the data samples
14 %
15 % VERSION: $Id: getZ.m,v 1.9 2011/03/21 15:47:29 mauro Exp $
16 %
17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18
19 function varargout = getZ(data,idx1,idx2)
20
21 % get z values
22 out = data.z;
23
24 % Decide if the user wants all data
25 switch nargin
26 case 2
27 out = out(idx1);
28 case 3
29 out = out(idx1, idx2);
30 end
31
32 varargout{1} = out;
33
34 end
35