attachment:Efficiency.m of CodeShare - MRC CBU Imaging Wiki
location: attachment:Efficiency.m of CodeShare

Attachment 'Efficiency.m'

Download

   1 %A bit of MATLAB code to play with efficiency. It can be easily modified to
   2 %estimate the efficiency of your own design. (From Russell Poldrack)
   3 
   4 TR=2;
   5 nruns=5000;
   6 efficiency=zeros(1,nruns);
   7 for x=1:nruns
   8    onsets=randperm(100);
   9    sf=zeros(1,100);
  10    sf(onsets(1:10))=1;
  11    hrf=spm_hrf(TR);
  12    conv_sf=conv(sf,hrf);
  13    conv_sf=conv_sf(1:100);
  14    X=[conv_sf' ones(100,1)];
  15    efficiency(x)=1/trace(inv(X'*X));
  16  end;
  17  hist(efficiency);

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2011-08-10 16:07:50, 0.4 KB) [[attachment:Efficiency.m]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.