how to get labeled contours plot when using a pdemodel ?

1 visualizzazione (ultimi 30 giorni)
Hugo
Hugo il 10 Feb 2021
Modificato: Hugo il 23 Feb 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 Commenti
Hugo
Hugo il 23 Feb 2021
Modificato: Hugo il 23 Feb 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');

Accedi per commentare.

Risposte (0)

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by