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: test_bug3420.m
    path of file: ./repos/fieldtrip/test
    
    the code of the file until where you have to start completion: function test_bug3420

% WALLTIME 00:10:00

    
function test_bug3420

% WALLTIME 00:10:00
% MEM 1gb
% DEPENDENCY ft_statistics_stats ft_timelockstatistics
% DATA no

close all

%%

nchan = 32;
ntrial = 10;
% effect = 0; % in this case the false alarm rate should be close to cfg.alpha, i.e. 5%
effect = 1/15;

timelock = [];
timelock.time = (1:1000)/1000;
timelock.dimord = 'rpt_chan_time';
for i=1:nchan
  timelock.label{i} = num2str(i);
  for j=1:ntrial
    % there is a linear increase over trials
    % the noise varies with the channels
    timelock.trial(j,i,:) = (i/nchan) * randn(1,1000) + j*effect;
  end