view m-toolbox/test/gui/functions/gltpda_times.m @ 52:daf4eab1a51e database-connection-manager tip

Fix. Default password should be [] not an empty string
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:29:47 +0100
parents f0afece42f48
children
line wrap: on
line source

function gltpda_times(handles)

% GLTPDA_TIMES multiply an array of analysis objects.
% 
% M Hewitson 15-02-07
% 
% $Id: gltpda_times.m,v 1.2 2007/03/14 16:06:10 hewitson Exp $
% 

%% Get selected AOs
% get AO array
aos = getappdata(handles.main, 'aos');

% Get selected objects
selected = get(handles.aoList, 'Value');
as = aos.objs(selected);

%% Add these together using lincom

if length(as) < 2
  error('### Select at least two analysis objects.');
else  
  b = as(1);
  for j=2:length(as)
    b = b*as(j);
  end
end

%% Add new ao to list 

% Add to object array
aos.objs  = [aos.objs b];
aos.nobjs = aos.nobjs + length(b);

% Set array
setappdata(handles.main, 'aos', aos);

% Update object list
gltpda_setAOlist(handles);




% END