Mercurial > hg > ltpda
comparison m-toolbox/classes/@ltpda_data/getDy.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 % GETDY Get the property 'dy'. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: Get the property 'dy'. | |
5 % | |
6 % CALL: val = obj.getDy(); | |
7 % val = obj.getDy(idx); | |
8 % val = obj.getDy(1:10); | |
9 % | |
10 % INPUTS: obj - must be a single ltpda_data (cdata, data2D, data3D) object. | |
11 % idx - index of the data samples | |
12 % | |
13 % VERSION: $Id: getDy.m,v 1.3 2011/03/21 14:54:32 mauro Exp $ | |
14 % | |
15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
16 | |
17 function out = getDy(data,idx) | |
18 | |
19 % Get dy values | |
20 out = data.dy; | |
21 | |
22 % Decide if the user wants all data | |
23 if nargin == 1 | |
24 % Make sure we output a column | |
25 if size(out,1) == 1 | |
26 out = out.'; | |
27 end | |
28 else | |
29 if size(out,1) == 1 | |
30 % Make sure we output a column | |
31 out = out(idx).'; | |
32 else | |
33 out = out(idx); | |
34 end | |
35 end | |
36 end | |
37 |