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: writeFile.m
    path of file: ./repos/d4m/examples/2Apps/5MIMIC/mic05_Visualize
    
    the code of the file until where you have to start completion: function [] = writeFile(data,fileName)
%% writeFile accepts data (string)
%% and writes it to a file with a
%% name provided in fileName (string)

    
function [] = writeFile(data,fileName)
%% writeFile accepts data (string)
%% and writes it to a file with a
%% name provided in fileName (string)
fileID = fopen(fileName,'w');
formatSpec = '%s';
fprintf(fileID,formatSpec,data);
fclose(fileID);
end