how to get labeled contours plot when using a pdemodel ?

2 次查看(过去 30 天)
Is there a way to label contour plots using pdeplot or pdecont function ?
I know that the function contour has the 'Showtext' option, but i cannot manage a way to find a similar option or workaround to have labeled contour plots together with the solution of a pdemodel.
  2 个评论
Hugo
Hugo 2021-2-23
编辑:Hugo 2021-2-23
Thanks for the reply.
No i am not sure you can use contour3 after using pdeplot.
Finally, the workaround i found is to interpolate the solutions on a x-y grid, to be able to use the contour function, with the 'Showtext' option.
result = solvepde(model);
[xm ym]= meshgrid(x);
uxy = interpolateSolution(result,xm,ym);
uxy=reshape(uxy,size(xm));
[con hc] = contour(x,y,uxy,'ShowText','on');

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geometry and Mesh 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by