comparison m-toolbox/classes/@LTPDAworkbench/cb_blockdoc.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 % CB_BLOCKDOC gets documentation for the selected block
2 %
3 % CALL: LTPDAworkbench.cb_blockdoc
4 %
5 % M Hewitson 25-01-09
6 %
7 % $Id: cb_blockdoc.m,v 1.4 2010/08/06 19:10:48 ingo Exp $
8 %
9
10 function cb_blockdoc(varargin)
11
12 wb = varargin{1};
13
14 % Get all selected blocks
15 sbs = awtinvoke(wb.mp, 'getSelectedBlocks');
16 if sbs.size() > 0
17 block = sbs.get(0);
18
19 cl = char(block.getMinfo.getMclass);
20 algo = char(block.getAlgo);
21
22 % workaround for abstract classes because the help for these classes
23 % are hidden.
24 if strcmpi(cl, 'ltpda_uo')
25 cl = 'plist';
26 elseif strcmpi(cl, 'ltpda_uoh')
27 cl = 'ao';
28 elseif strcmpi(cl, 'ltpda_tf')
29 cl = 'pzmodel';
30 elseif strcmpi(cl, 'ltpda_filter')
31 cl = 'miir';
32 end
33
34 if ~strcmp(cl, algo)
35 cmd = ['doc ' cl '/' algo];
36 else
37 cmd = ['doc ' algo];
38 end
39 eval(cmd)
40
41 end
42
43 end