
%
%  update_psd.m  ver 1.0  by Tom Irvine
%

function[cell_array]=update_psd()

            vars = evalin('base', 'whos');
            cell_array = cell(size(vars));
            for i=1:length(vars)
                cell_array{i} ='999';
                if(contains(vars(i).name,'myHandle') || ...
                   contains(vars(i).name,'vname_list') || ...
                   contains(vars(i).name,'PLF_spl') || ...
                   contains(vars(i).name,'Dirlik_N') || ...
                   strcmp(vars(i).name,'GR63_zone4') || ...
                   strcmp(vars(i).name,'Harris_2p') || ...
                   strcmp(vars(i).name,'vafb_1p') || ...
                   strcmp(vars(i).name,'Q400') || ...
                   strcmp(vars(i).name,'drop') || ...
                   strcmp(vars(i).name,'two_dof_mass') || ...
                   strcmp(vars(i).name,'two_dof_stiffness') || ...
                   strcmp(vars(i).name,'mode_1') || ...
                   strcmp(vars(i).name,'mode_2') || ...
                   strcmp(vars(i).name,'mode_3') || ...              
                   strcmp(vars(i).name,'mode_4') || ...
                   strcmp(vars(i).name,'mode_5') || ... 
                   strcmp(vars(i).name,'mode_6') || ...           
                   strcmp(vars(i).name,'two_dof_ModeShapes') || ...
                   strcmp(vars(i).name,'Ha_11') || ... 
                   strcmp(vars(i).name,'Ha_12') || ... 
                   strcmp(vars(i).name,'Ha_21') || ... 
                   strcmp(vars(i).name,'Ha_22') || ... 
                   strcmp(vars(i).name,'Hd_11') || ... 
                   strcmp(vars(i).name,'Hd_12') || ... 
                   strcmp(vars(i).name,'Hd_21') || ... 
                   strcmp(vars(i).name,'Hd_22') || ...
                   strcmp(vars(i).name,'Hv_11') || ... 
                   strcmp(vars(i).name,'Hv_12') || ... 
                   strcmp(vars(i).name,'Hv_21') || ... 
                   strcmp(vars(i).name,'Hv_22') || ...  
                   strcmp(vars(i).name,'pyro_srs') || ...
                   strcmp(vars(i).name,'pyro_srs_Q20') || ...        
                   strcmp(vars(i).name,'liftoff_ground_spl') || ...                
                   strcmp(vars(i).name,'stress_th') || ...
                   contains(vars(i).name,'HM_disp_force') || ...  
                   contains(vars(i).name,'HM_vel_force') || ...  
                   contains(vars(i).name,'H_disp_force') || ...  
                   contains(vars(i).name,'H_vel_force') || ...               
                   contains(vars(i).name,'amp_cycles') || ...
                   contains(vars(i).name,'range_cycles') || ...
                   contains(vars(i).name,'amp_mean_cycles') || ...
                   contains(vars(i).name,'range_cycles_max_min')|| ...
                   strcmp(vars(i).name,'two_dof_mass') ||...
                   strcmp(vars(i).name,'point_mass_matrix') ||...
                   contains(vars(i).name,'Hanning') ||...
                   contains(vars(i).name,'_fds_Q1') ||...
                   contains(vars(i).name,'_fds_Q3') ||...      
                   strcmp(vars(i).name,'sz'))          

                   cell_array{i} ='999';
                else    
                    ggg=evalin('base',vars(i).name);
                    sz=size(ggg);

                    try
                        mint2=0;
                        try
                            mint2=min(ggg(:,2));
                        catch
                        end
    
                        if(sz(2)==2 && mint2>=0)
                            cell_array{i} = vars(i).name;
                        else
                            cell_array{i} ='999';
                        end
                    catch
                        cell_array{i} ='999';
                    end    
                end    
            end
            for i=length(vars):-1:1
                if(contains(cell_array{i},'999'))
                    cell_array(i,:)=[];
                end
            end         