Mercurial > hg > ltpda
comparison m-toolbox/classes/+utils/@prog/prog.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 % PROG helper class for prog utility functions. | |
2 % | |
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
4 % | |
5 % DESCRIPTION: PROG is a helper class for prog utility functions. | |
6 % | |
7 % To see the available static methods, call | |
8 % | |
9 % >> methods utils.prog | |
10 % | |
11 % HISTORY: M Hewitson 26-05-08 | |
12 % Creation | |
13 % | |
14 % VERSION: $Id: prog.m,v 1.19 2010/10/07 07:56:09 hewitson Exp $ | |
15 % | |
16 % | |
17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
18 | |
19 classdef prog | |
20 | |
21 %------------------------------------------------ | |
22 %--------- Declaration of Static methods -------- | |
23 %------------------------------------------------ | |
24 methods (Static) | |
25 | |
26 | |
27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
28 % Info call | |
29 function ii = getInfo(varargin) | |
30 if nargin == 0 | |
31 VERSION = '$Id: prog.m,v 1.19 2010/10/07 07:56:09 hewitson Exp $'; | |
32 CATEGORY = 'Constructor'; | |
33 % Build info object | |
34 ii = minfo(mfilename, mfilename, 'utils', CATEGORY, VERSION, {''}, plist); | |
35 else | |
36 if strcmp(varargin{1}, mfilename) | |
37 ii = utils.prog.getInfo; | |
38 else | |
39 ii = eval(sprintf('utils.prog.%s(''INFO'');', varargin{1})); | |
40 end | |
41 end | |
42 end | |
43 | |
44 | |
45 %------------------------------------------------------------- | |
46 % List other methods | |
47 %------------------------------------------------------------- | |
48 | |
49 s = rstruct(varargin); % Recursive structure converter | |
50 string = cell2str(cellstr); % Convert a cell array to string | |
51 out = find_in_models(modelname,varargin); | |
52 childrenHandles = findchildren(parentHandle,varargin) | |
53 parentHandles = findparent(childHandle,varargin) | |
54 varargout = gcbsh(); | |
55 pth = get_curr_m_file_path (m_file_name) | |
56 fnames = fields2list(fields) | |
57 files = filescan(root_dir, ext) | |
58 dirs = dirscan(root_dir, pattern) | |
59 h = funchash(fcnname) | |
60 h = hash(inp,meth) | |
61 newCell = str2cells(someString) | |
62 cell = strs2cells(varargin) | |
63 ss = rnfield(s,oldname,newname) | |
64 out = structcat(varargin) | |
65 so = strpad(varargin) | |
66 s = wrapstring(s, n) | |
67 varargout = disp(varargin) | |
68 s = label(si) | |
69 varargout = mcell2str(varargin) | |
70 out = yes2true(in) | |
71 r = mup2mat(r) | |
72 output = convertComString(varargin) | |
73 s = csv(x) | |
74 bin = obj2binary(obj) | |
75 xml = obj2xml(obj) | |
76 | |
77 end % End static methods | |
78 | |
79 | |
80 end | |
81 | |
82 % END |