MATLAB: How to used data exported from the PDE toolbox in order to create specific XY plots

export datamash datapde toolboxsolution against timesolution along a linexy plots

Using the partial differential equation toolbox, I have solved a few heat transfer problems. I understand how to export the data from the mesh and the solution, but am unable to use it to create a proper script. I am attempting to create two specific XY plots with the data from the toolbox, but am unsure how to use the appropriate functions with the mesh data that is exported.
The first thing I am attempting to create is a script a graph of the solution value along an arbitrary line drawn over the solution showed in the PDE toolbox. In other words, with the mesh data I can export I need to specify a certain straight line along the solution given in the toolbox, then plot the resulting temperature versus that line in an XY plot. I need to create a script in which I specify that line and then graph the solution at points along it.
The second plot I am attempting to create is an XY plot that shows the solution value (temperature) at a given point against the time that the heat is being applied in my problem. I need a script that will allow me to use the mesh data to specify a point, then graph the temperature at that point against time.

Best Answer

Depending on your toolbox version, there are differing ways to plot things. If you have a relatively recent version, then use Plot 2-D Solutions and their Gradients, especially the latter part of the example, which shows how to interpolate the results to a straight line segment.
If you are using an old toolbox version where you have to use a [p e t] representation of the mesh, then you can use pdeInterpolant to create an interpolant, and use evaluate to create the interpolated values. The evaluate function reference page has several examples.
Alan Weiss
MATLAB mathematical toolbox documentation