...
Just as you can read in values from a text file to a matrix, you can also write a matrix to a text file. The function for this is call dlmwrite. Consider the following line of code:
In the above line of code, we write matrix A to a text file named output_file, and we use a space as a delimiter. Add this line of code to beam4.m and run it. You should see a text file named output_file appear in your working directory. If you wish to learn more about dlmwrite, type help dlmwrite into the command window.
Output Important Values in Command Window
...