You may save it using the '%d' formatting operator and save it line by line to a text file. Use '\n' for moving to the next line.
Please see this doc and the examples in it to understand how to print your ascii values line by line.
In general, I have found the examples very useful in learning a new function or tool in matlab. Try picking out the first example in the doc.
Hope it Helps!