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: arGet.m
    path of file: ./repos/d2d/arFramework3/Advanced
    
    the code of the file until where you have to start completion: % data = arGet(fields, [m, dset, sig, struct])
%
% Returns data from ar struct according to a cell of field names
% 
%   fields  single s
    
function data = arGet(fields, m, dset, sig, struct)

global ar

% Fill in unset optional values.
switch nargin
    case 1
        m = 1;
        dset = 1;
        sig = false;
        struct = ar;
    case 2
        dset = 1;
        sig = false;
        struct = ar;
    case 3
        sig = false;
        struct = ar;
    case 4
        struct = ar;
end