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: compute_contrasts.m
    path of file: ./repos/bspm/thirdparty/spm12/toolbox/marsbar-0.44/@mardo_2
    
    the code of the file until where you have to start completion: function [marsS] = compute_contrasts(marsDe, Ic)
% compute and return results of contrast statistics
% FORMAT marsS = compute_contrasts(marsDe, Ic)
% 
% marsDe     - design object
% Ic         - indices into contrast structure
%
% Output
% marsS      - statistic result structure
%
% For the 'con', 'stat' 'P' 'Pc' fields below, the results are matrices
% with one row per contrast, one column per ROI estimated
%
% The statistics results structure has fields
% 'con'      - contrast value (numerator of t statistic, or ESS for F)
% 'stat'     - t or F statistic value
% 'P'        - uncorrected P value
% 'Pc'       - P values corrected for number of ROIs
% 'MVres'    - multivariate results structure with fields
%              'y_pre'    - predicted temporal response
%              'y_obs'    - observerd temporal response
%              'Pf'       - probabability for last (rank of subspace)
%                           eigenvalues  
%              'u'        - principle components
%              'ds'       - component weights (diag(S))
%              'df'       - degrees of freedom for Pf              
% 'columns'  - names of regions
% 'rows'     - cell array of structs, one per contrast calculated,
%              with fields:
%              'name'  - contrast name
%              'stat'  - statistic type (T|F)
%
% $Id$

SPM = des_struct(marsDe);

    
function [marsS] = compute_contrasts(marsDe, Ic)
% compute and return results of contrast statistics
% FORMAT marsS = compute_contrasts(marsDe, Ic)
% 
% marsDe     - design object
% Ic         - indices into contrast structure
%
% Output
% marsS      - statistic result structure
%
% For the 'con', 'stat' 'P' 'Pc' fields below, the results are matrices
% with one row per contrast, one column per ROI estimated
%
% The statistics results structure has fields
% 'con'      - contrast value (numerator of t statistic, or ESS for F)
% 'stat'     - t or F statistic value
% 'P'        - uncorrected P value
% 'Pc'       - P values corrected for number of ROIs
% 'MVres'    - multivariate results structure with fields
%              'y_pre'    - predicted temporal response
%              'y_obs'    - observerd temporal response
%              'Pf'       - probabability for last (rank of subspace)
%                           eigenvalues  
%              'u'        - principle components
%              'ds'       - component weights (diag(S))
%              'df'       - degrees of freedom for Pf              
% 'columns'  - names of regions
% 'rows'     - cell array of structs, one per contrast calculated,
%              with fields:
%              'name'  - contrast name
%              'stat'  - statistic type (T|F)
%
% $Id$

SPM = des_struct(marsDe);
xCon = SPM.xCon;
  
if nargin < 2
  Ic = 1:length(xCon);
end