Prev: Matlab & Java
Next: velocity field in fluid dynamics
From: Steven Lord on 13 Jul 2010 10:02 "Abe Devinko" <abe_cooldude(a)yahoo.com> wrote in message news:i1hgua$2jm$1(a)fred.mathworks.com... > Nvm, figured it out! > > But now i have another problem :( > > Now I have temperature of each of the 40 nodes in T, and wish to plot a > temperature distribution in the plate per location. How would I go about > doing that? > > I know I will have to store the temperature profile in a 2D matrix, and > then create a meshgrid according to dimensions of the plate (my delta is > 0.1 in x and y direction). Here's the diagram of the problem. > [IMG] http://i25.tinypic.com/2v0zi8m.jpg [/IMG] > > I know i have to use meshgrid command to have temp for each node displayed > at the right location on the plate, but I am not very familiar with how to > do it. Then try a simple example. [x, y] = meshgrid([1 2 3], [4 5 6]) Note the structure of the x and y matrices. Each pair [x(k), y(k)] for k between 1 and 9 inclusive gives the coordinate of a different point on your grid. If you were to create a simple surface plot with SURF using the above data, can you predict what it will look like? [x, y] = meshgrid(1:3, 4:6) z = magic(3) surf(x, y, z) xlabel('x') ylabel('y') zlabel('z') You may need to rotate the surface around to get a good look at each grid point. Now you should be able to use this as a "template" to create a grid that works for your problem, put your node data in the correct ordering, and create the surface. There are also other 3D plotting techniques that you can use -- PLOT3, MESH, etc. may also look good for this data. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com |