Watch this Author's files
I found this code to be very useful and it seems to work exactly as described. Thank you for your excellent contribution.
Contact us at files@mathworks.com