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: regression.m
    path of file: ./repos/fieldtrip/external/bayesFactor/+bf
    
    the code of the file until where you have to start completion: function [bf10,lm] = regression(tbl,formula)
% [bf10,lm] = regression(tbl,formula)
% Given a table and a Wilcoxon formula, perform a regression and return 
% the Bayes Factor for the full model versus the intercept only (null)
% model.

    
function [bf10,lm] = regression(tbl,formula)
% [bf10,lm] = regression(tbl,formula)
% Given a table and a Wilcoxon formula, perform a regression and return 
% the Bayes Factor for the full model versus the intercept only (null)
% model.
% INPUT
%  tbl - Data table 
% formula - Wilcoxon notation for the regression.
% OUTPUT
% bf10 - Bayes Factor for the regression (against the null model).
% lm  - The LinearModel for the regression.
%
% BK - Dec 2019

if iscell(formula)
    nrFormulas = numel(formula);
    bf10 = nan(1,nrFormulas);
    lm =cell(1,nrFormulas);
    for i=1:numel(formula)
        [bf10(i),lm{i}] = bf.regression(tbl,formula{i});
    end