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: io_writelcmraw.m
    path of file: ./repos/osprey/libraries/FID-A/inputOutput
    
    the code of the file until where you have to start completion: %io_writelcmraw.m
%Jamie Near, McGill University 2014.
%
% USAGE:
% RF=io_writelcmraw(data_struct,outfile,metab);
% 
% DESCRIPTION:
% Take a simulated metab
    
function is a text file in LCModel raw format.  
    
function RF=io_writelcmraw(data_struct,outfile,metab);
%function RF=writelcmraw(data_struct,outfile);
idx  = find(strcmp(data_struct.name,metab));

expname=[data_struct.seq{1} num2str(data_struct.te) '_' data_struct.name{idx} 'Sim'];
comment=['Simulated LCModel basis set for ' data_struct.name{idx} ' ' data_struct.seq{1}...
    ' experiment with echo time ' num2str(data_struct.te) ' ms'];

t=repmat(data_struct.t',[1 data_struct.sz(2:end