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: loadProject.m
    path of file: ./repos/A-Lab/include/General Methods
    
    the code of the file until where you have to start completion: function loadProject(app)
% Copyright (C) Jose M. Requena Plens 
% joreple@upv.es - jmrplens.github.io

% Select file
[FileName,PathName] = uigetfile({[userpath,filesep,'*.alab']},'Select .alab file');

if FileName ~= 0
    % Update userpath
    userpath(PathName);

    
function loadProject(app)
% Copyright (C) Jose M. Requena Plens 
% joreple@upv.es - jmrplens.github.io

% Select file
[FileName,PathName] = uigetfile({[userpath,filesep,'*.alab']},'Select .alab file');

if FileName ~= 0
    % Update userpath
    userpath(PathName);
    
    % Load
    appaux = load([PathName,FileName],'-mat');
    
    %app.ExtUI = appaux.ExtUI;
    app.ExtVar = appaux.ExtVar;
    app.MeasureType = appaux.MeasureType;
    app.Averages = appaux.Averages;
    app.SampleRate = appaux.SampleRate;
    app.SamplesPerFrame = appaux.SamplesPerFrame;
    app.Driver = appaux.Driver;
    devices = getAvailableDevices();
    if find(appaux.Device == string(devices))
        app.Device = appaux.Device;
    else
        app.Device = devices(1);
    end