フィルターのクリア

Converting NodalSolution to Matrix

9 ビュー (過去 30 日間)
Dylan Green
Dylan Green 2021 年 2 月 25 日
回答済み: Shraddha Jain 2021 年 3 月 3 日
I have solved a PDE (2 spatial dimensions + time) using the PDE Toolbox. I would like to do plots where I hold one spatial dimension fixed and plot the solution over the remaining spatial dimension and time. It would be trivial to do this if my solution was in the form of a matrix with axes (x,y,t), but it's not clear how to convert the NodalSolution object returned by the PDE solver into such a matrix. Is this possible? If not, is there a simple way to get the kind of plot I mentioned using this object directly?
Thanks!

回答 (1 件)

Shraddha Jain
Shraddha Jain 2021 年 3 月 3 日
Hi Dylan,
When you solve a Partial Differential Equation using solvepde as,
result = solvepde(model,tlist)
the output result is an object. The nodal solution in matrix format can be accessed as,
u = results.NodalSolution;
Please refer to the examples in the solvepde documentation for more information on how to plot u.

カテゴリ

Help Center および File ExchangeGeneral PDEs についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by