comparison m-toolbox/test/gui/functions/gltpda_plus.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 function gltpda_plus(handles)
2
3 % GLTPDA_PLUS adds together the selected AOs to create a new AO.
4 %
5 % M Hewitson 15-02-07
6 %
7 % $Id: gltpda_plus.m,v 1.1 2007/03/12 13:00:31 hewitson Exp $
8 %
9
10 %% Get selected AOs
11 % get AO array
12 aos = getappdata(handles.main, 'aos');
13
14 % Get selected objects
15 selected = get(handles.aoList, 'Value');
16 as = aos.objs(selected);
17
18 %% Add these together using lincom
19
20 if length(as) < 2
21 error('### Select at least two analysis objects.');
22 elseif length(as) == 2
23 b = as(1)+as(2);
24 else
25 pl = plist(param('coeffs', ones(1,length(as))));
26 b = ltpda_lincom(as, pl);
27 end
28
29 %% Add new ao to list
30
31 % Add to object array
32 aos.objs = [aos.objs b];
33 aos.nobjs = aos.nobjs + length(b);
34
35 % Set array
36 setappdata(handles.main, 'aos', aos);
37
38 % Update object list
39 gltpda_setAOlist(handles);
40
41 % END