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: mne_ex_cancel_noise.m
    path of file: ./repos/spm12/external/mne
    
    the code of the file until where you have to start completion: function [res,proj,comp] = mne_ex_cancel_noise(data,dest_comp)
%
%   Do projection and compensation as needed
%   Return the appropriate operators
%   
%   [res,proj,comp] = mne_ex_cancel_noise(data,dest_comp)
%
%   res     - Data after noise cancellation
%   proj    - The projection operator applied
%   comp    - The compensator which brings uncompensated data to the
%             desired compensation grade (will be useful in forward
%             calculations)
%

%
%   Author : Matti Hamalainen, MGH Martinos Center
%   License : BSD 3-clause
%
%   Revision 1.4  2006/05/05 03:50:40  msh
%   Added routines to compute L2-norm inverse solutions.
%   Added mne_write_inverse_sol_stc to write them in stc files
%   Several bug fixes in other files
%

    
function [res,proj,comp] = mne_ex_cancel_noise(data,dest_comp)
%
%   Do projection and compensation as needed
%   Return the appropriate operators
%   
%   [res,proj,comp] = mne_ex_cancel_noise(data,dest_comp)
%
%   res     - Data after noise cancellation
%   proj    - The projection operator applied
%   comp    - The compensator which brings uncompensated data to the
%             desired compensation grade (will be useful in forward
%             calculations)
%

%
%   Author : Matti Hamalainen, MGH Martinos Center
%   License : BSD 3-clause
%
%   Revision 1.4  2006/05/05 03:50:40  msh
%   Added routines to compute L2-norm inverse solutions.
%   Added mne_write_inverse_sol_stc to write them in stc files
%   Several bug fixes in other files
%
%   Revision 1.3  2006/04/27 20:57:41  msh
%   Fixed typo on line 76 of mne_ex_cancel_noise
%
%   Revision 1.2  2006/04/23 15:29:40  msh
%   Added MGH to the copyright
%
%   Revision 1.1  2006/04/21 17:31:07  msh
%   Added the examples.
%   Modified the formatting of some informative output.
%
%

me='MNE:mne_ex_cancel_noise';

if nargin == 1
    dest_comp = 0;
elseif nargin ~= 2
    error(me,'Incorrect number of arguments');
end