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: gif2data.m
    path of file: ./repos/HydroSight/GUI/icons
    
    the code of the file until where you have to start completion: function gif2data()
%GIF2DATA Convert gif icons to data
%   gif icons concerted to data to avoid GUI use of image processing toolbox.

    icon = 'implay_export.gif';
    [cdata,map] = imread(icon);
    map(find(map(:,1)+map(:,2)+map(:,3)==3)) = NaN;
    cdata = ind2rgb(cdata,map);
    iconData.implay = cdata;
    
    icon = 'foldericon.gif';
    [cdata,map] = imread(icon);
    map(find(map(:,1)+map(:,2)+map(:,3)==3)) = NaN;

    
function gif2data()
%GIF2DATA Convert gif icons to data
%   gif icons concerted to data to avoid GUI use of image processing toolbox.

    icon = 'implay_export.gif';
    [cdata,map] = imread(icon);
    map(find(map(:,1)+map(:,2)+map(:,3)==3)) = NaN;
    cdata = ind2rgb(cdata,map);
    iconData.implay = cdata;
    
    icon = 'foldericon.gif';
    [cdata,map] = imread(icon);
    map(find(map(:,1)+map(:,2)+map(:,3)==3)) = NaN;
    cdata = ind2rgb(cdata,map);
    iconData.folder = cdata;
    
    % Add new button for help.
    icon = 'helpicon.gif';
    [cdata,map] = imread(icon);
    map(find(map(:,1)+map(:,2)+map(:,3)==3)) = NaN;
    cdata = ind2rgb(cdata,map);
    iconData.help = cdata;

    save('iconData.mat',"iconData");  

    % Import and save app icon
    iconData = javax.swing.ImageIcon('icon16x16.png');
    save('appIcon.mat',"iconData");  

end