MATLAB: How to use interpolateSolution when StationaryResults has multiple equations or solutions

Partial Differential Equation Toolboxpde

I am trying to use "interpolateSolution" on an example in the PDE toolbox, specifically the Clamped Square Plate Example. I want to do a linear scan along the 2 dimensional results. How can I accomplish this?

Best Answer

In this case, the results object has results for multiple equations. Because of this, it is necessary to pass a parameter into "interpolateSolution" to specify which solution sets you would like data from. Try the following code as an example:
xq = linspace(0,10);
yq = ones(1,100);
uinterp = interpolateSolution(res,xq,yq,[1,2]);
fig = figure;
plot(uinterp);
In this case, [1,2] is specifying that we want the results from both the first and second equations. [1] would return the first results only while [2] would return the second results only.
For more information, please see the following documentation for "interpolateSolution":