How to plot in Matlab a simulation from Cadence? How to export a Cadence graph to Matlab?
Ploting in Cadence is enough to understand and work with the simulation results. But if we want to take care of the esthetics, for example to make report or include some graphs in a thesis or paper, we need to replot the simulation in Matlab or other software.
Matlab is much better to modify and create nice graphs with text, titles, axis, etc
Here, I will explain with an example how easy is to plot the results of a simulation in Cadence in Matlab.
First, plot the simulation results in Cadence. Right click on the signal you want to export and click on “export…” as shown in the figure below. In the case you want to export more than one signal, you can select “Send to Export List”.
The following window will prompt: There you can select the file type to export. CSV or Matlab are fine. Also, you can modify the data you are going to export by clipping it, modifying the name or selecting the number of significant digits.
Once you export the data, you will obtain text file columns, where the first column correspond with the time (in seconds) and then the signals.
Now we can open the file in Matlab:
The data is automatically imported to Matlab as table (something similar to structures in C). I recommend modifying the mane given from Cadence of each column to something easier like t and y. This can be done by clicking directly on the name and writing the new name on it.
After that, click on the green check “Import Selection”. Now a new variable of type “table” should be created in our workspace:
With the plot command we can graphically see the signal originally exported from Cadence.
Now we can work on the “beauty” of the graph easily in Matlab!!