how to get labeled contours plot when using a pdemodel ?

조회 수: 2 (최근 30일)
Hugo
Hugo 2021년 2월 10일
편집: Hugo 2021년 2월 23일
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
darova
darova 2021년 2월 21일
Did you try using contour3?
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