With the command write, you can write results of your computation in a file:

A=rand(5,3)
write('myMatrix.txt',A)