Documentation for writematrix function, writematrix(A,filename) here A is the matrix and filename is the name of the .csv file you want to save it to.
This is another possible function, but it is not recommended by matlab.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!