help with contourf plot

1 Ansicht (letzte 30 Tage)
Phillip
Phillip am 30 Sep. 2012
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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 30 Sep. 2012
contourf(x, y, z)
  3 Kommentare
Walter Roberson
Walter Roberson am 30 Sep. 2012
Yes.
Phillip
Phillip am 30 Sep. 2012
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by