function RunRetroTS_Demo(subj)

   ll = [subj];
   i = 1;
   ecg1 = sprintf('s%d_ecg_rest.dat', ll(i));
   res1 = sprintf('s%d_respir_rest.dat', ll(i));
   pref1 = sprintf('demo.s%d_RTS', ll(i));
   ecg2 = sprintf('s%d_ecg_visual_rest.dat', ll(i));
   res2 = sprintf('s%d_respir_visual_rest.dat', ll(i));
   pref2 = sprintf('demo.s%d_VRTS', ll(i));

   if (1),
      ecg = ecg1;
      res = res1;
      pref = pref1;
   else,   
      ecg = ecg2;
      res = res2;
      pref = pref2;
   end

   Opt.Quiet = 0;
   Opt.Demo = 1;
  
   Opt.PhysFS=1./0.02;
   Opt.Nslices=42;
   Opt.VolTR=3.5;
   
   Opt.Respfile = res;
   Opt.Cardfile = ecg;
   Opt.Prefix = pref;
   [Opt1(i), OptR1(i), OptE1(i)] = RetroTS(Opt);

   uiwait(msgbox('Press button to quit', 'Pausing', 'modal'));
   
   exit;
