I can't get this to work.... the script executes successfully, in that I don't get any error messages, but returns an empty array of Z[]... I have posted a question on matlab central to ask for some advice... any suggestions for debugging would be helpful, thanks.