CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   contour plotts using matlab (http://www.cfd-online.com/Forums/main/4548-contour-plotts-using-matlab.html)

matlab March 20, 2002 10:04

contour plotts using matlab
 
hi fox

as this is a new plotts to me i appreciate any help. i need to plot a contour with:

x-axis is the position (-10, 10);

y-axis is the time, starting from the lowest till it reach the given time.

z-axis is the density solution.

the data generated using f90 in a file.

any matlab help please.

many thanks. xxx


Junseok Kim March 20, 2002 21:17

Re: contour plotts using matlab
 
Would you send your data file to me, I will write a matlab code for you.


Steven Jachec March 27, 2002 11:33

Re: contour plotts using matlab
 
To contour in MATLAB, you x, y, and z must be matrices of the same size. There are MATLAB tools to help with this. For example,

x = -10:10 y = 0:60

then you need to meshgrid the x & y data, like [X,Y] = meshgrid(x,y);

your z data (density) should then be the same size as X & Y

type pcolor(X,Y,Z); shading interp;colorbar

Key words: meshgrid, pcolor, mesh, surf

Steven Jachec


All times are GMT -4. The time now is 05:57.