Mercurial > hg > ltpda
view m-toolbox/classes/@cdata/char.m @ 1:2014ba5b353a database-connection-manager
Remove old code
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Sat, 03 Dec 2011 18:13:55 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% CHAR convert a cdata-object into a string. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: CHAR convert a cdata object into a string. % % CALL: string = char(fsdata) % % VERSION: $Id: char.m,v 1.12 2011/02/18 16:48:51 ingo Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function varargout = char(varargin) % Collect all cdata-objects objs = [varargin{:}]; %%% Add the size of the data (all) pstr = sprintf('(Ndata=[%sx%s],', num2str(size(objs.y,1)), num2str(size(objs.y,2))); %%% Add the sample rate of data (tsdata, fsdata) if isprop(objs, 'fs') pstr = sprintf('%s fs=%g,', pstr, objs.fs); end %%% Add the length of this time-series in seconds (tsdata) if isprop(objs, 'nsecs') pstr = sprintf('%s nsecs=%d,', pstr, objs.nsecs); end %%% Add number of averages (fsdata) if isprop(objs, 'navs') pstr = sprintf('%s navs=%d,', pstr, objs.navs); end %%% Add time-stamp of the first data sample (fsdata, tsdata) if isprop(objs, 't0') pstr = sprintf('%s t0=%s,', pstr, char(objs.t0)); end pstr(end) = ')'; varargout{1} = pstr; end