how to get labeled contours plot when using a pdemodel ?

2 Ansichten (letzte 30 Tage)
Hugo
Hugo am 10 Feb. 2021
Bearbeitet: Hugo am 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 Kommentare
darova
darova am 21 Feb. 2021
Did you try using contour3?
Hugo
Hugo am 23 Feb. 2021
Bearbeitet: Hugo am 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');

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by