Watch this Author's files
Works great. Thanks to Thomas for the tip - I was also tripped up by the (y,x,z) input ordering.
This is great. One problem was that 'evalin' doesn't work properly within a parfor loop. So I made a minor modification to allow 'save -struct' style saving which works fine in parfor:
If anyone is interested Python code for other direction (to format Python arrays for copy and pasting into an interactive MATLAB session is available here: