view m-toolbox/classes/@ltpda_data/getDy.m @ 34:03d92954b939 database-connection-manager

Improve look of LTPDAPreferences diaolog
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% GETDY Get the property 'dy'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: Get the property 'dy'.
%
% CALL:        val = obj.getDy();
%              val = obj.getDy(idx);
%              val = obj.getDy(1:10);
%
% INPUTS:      obj - must be a single ltpda_data (cdata, data2D, data3D) object.
%              idx - index of the data samples
%
% VERSION:     $Id: getDy.m,v 1.3 2011/03/21 14:54:32 mauro Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function out = getDy(data,idx)

  % Get dy values
  out = data.dy;

  % Decide if the user wants all data
  if nargin == 1
    % Make sure we output a column
    if size(out,1) == 1
      out = out.';
    end
  else
    if size(out,1) == 1
      % Make sure we output a column
      out = out(idx).';
    else
      out = out(idx);
    end
  end
end