You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: pca2_weights_positions.m
    path of file: ./repos/HRTF-Individualization/model/matlabcode/functions/depricated/gui_exp
    
    the code of the file until where you have to start completion: function [weights_selected] = pca2_weights_positions(pos_ind,hObject, eventdata, handles)

% Get weights of all subjects for choosen position

global weights
global subjects


    
function [weights_selected] = pca2_weights_positions(pos_ind,hObject, eventdata, handles)

% Get weights of all subjects for choosen position

global weights
global subjects


% Static position, only one position // Trajectories
if (get(handles.soundmode,'Value') == 1) || (get(handles.soundmode,'Value') == 2) 
    weights_selected = weights;  
end