To create a matfile containing a plot in MATLAB, follow the steps below:
Generate the data for the plot you want to save to a file.
Create a figure and plot the data onto it.
117 chars8 lines
28 chars2 lines
That's it! You have now saved the data used to create the plot to a matfile.
Note that the actual plot is not saved in the matfile. Only the data used to create it is saved. To recreate the plot, you will need to load the data from the matfile and create the figure and plot again using the plot
command.
106 chars7 lines
This will recreate the original plot from the saved data.
gistlibby LogSnag