help with contourf plot

조회 수: 1 (최근 30일)
Phillip
Phillip 2012년 9월 30일
My problem is a 2-d steady state heat conduction problem. The domain is a rectangle. I calculated the anayltical solution, and then created an x-vector and y-vector. I plugged the points into the analytical solution and stored the result into the z-matrix.
Using contourf(z) the x-axis shows the column number of the z-matrix and the y-axis shows the row number in the z-matrix. I would prefer that the axes show the x and y coordinates. is there a way to do that?

채택된 답변

Walter Roberson
Walter Roberson 2012년 9월 30일
contourf(x, y, z)
  댓글 수: 3
Walter Roberson
Walter Roberson 2012년 9월 30일
Yes.
Phillip
Phillip 2012년 9월 30일
Ok i got it to work, thanks!
Also, is it possible to do a similar plot for an L-shaped domain where the portion of the plot that is outside the domain has no color? Maybe using NaN is the z matrix locations.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by