view m-toolbox/classes/@data3D/getDz.m @ 4:e3c5468b1bfe database-connection-manager

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

% GETDZ Get the property 'dz'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: Get the property 'dz'.
%
% CALL:        val = obj.getDz();
%              val = obj.getDz(idx);
%              val = obj.getDz(idx1, idx2);
%              val = obj.getDz(1:10);
%              val = obj.getDz(1,:);
%
% INPUTS:      obj - must be a single data3D object.
%              idx - index of the data samples
%
% VERSION:     $Id: getDz.m,v 1.1 2011/03/21 15:47:49 mauro Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function varargout = getDz(data,idx1,idx2)

  % get dz values
  out = data.dz;

  % Decide if the user wants all data
  switch nargin
    case 2      
      out = out(idx1);
    case 3
      out = out(idx1, idx2);
  end
  
  varargout{1} = out;

end