Mercurial > hg > ltpda
comparison m-toolbox/test/gui/functions/gltpda_times.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_times(handles) | |
2 | |
3 % GLTPDA_TIMES multiply an array of analysis objects. | |
4 % | |
5 % M Hewitson 15-02-07 | |
6 % | |
7 % $Id: gltpda_times.m,v 1.2 2007/03/14 16:06:10 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 else | |
23 b = as(1); | |
24 for j=2:length(as) | |
25 b = b*as(j); | |
26 end | |
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 | |
42 | |
43 | |
44 % END |