Digitalio TTL Trigger

Hi,

Trying to trigger a 5V TTL pulse from my PC to a Magstim device to trigger a 0.2s train of pulses, but I can't get my code to work.

dio = digitalio('parallel','LPT1');
addline(dio,0:7,'out');
line=1;
putvalue(dio.line(line),0);
putvalue(dio.line(line),1);
putvalue(dio.line(line),0);

Please help!

Sam