how to get labeled contours plot when using a pdemodel ?

5 visualizaciones (últimos 30 días)
Hugo
Hugo el 10 de Feb. de 2021
Editada: Hugo el 23 de Feb. de 2021
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 comentarios
darova
darova el 21 de Feb. de 2021
Did you try using contour3?
Hugo
Hugo el 23 de Feb. de 2021
Editada: Hugo el 23 de Feb. de 2021
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');

Iniciar sesión para comentar.

Respuestas (0)

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by