There is an undocumented 'feature' in MathCad which allows you to write data out to a file from a program. Looks something like
writeprn(myvariable, "myfilepath")
Where myvariable is the variable or matrix to be written out, "myfilepath" is a string containing the complete path to your file...