Watch this Author's files
preventing waitbar from slowing down your calculation:
for i =1:50000
if ((i/100) == floor(i/100))
not bad, but for 50,000 calculations workbar slows progress down by a factor of 2. Better than waitbar (a factor of 5) but still...