mesh-plot

  • Follow


Hello,

I try to plot a mesh, but everytime I get an error. I have 3 files (file1,
file2, file3), every of them contains 1 column and n rows of several data.
Now i want to plot the data so that x-axis contains the values of file1, the
y-axis contains the value of file2 and the z-axis contains the values of
file3.

I tried the following:

load file1.txt;
a=file1;

load file2.txt;
b=file2;

load file3.txt;
c=file3;

[X,Y] = meshgrid(a,b);
mesh(X,Y,c);

but an error occurs by function mesh

thanx for help - Tino


0
Reply tino.langer (6) 10/17/2003 5:37:48 PM

Hi Tino ,


          Could u please provide me some information about the files
which u are using i.e file1,file2,file3.
Well file3 i.e the one with the variable c should be a function of a
and b .


For example if i have a=-2:0.2:2 and
b=-2:0.2:2 and u do [X,Y]=meshgrid(a,b) well it will work but when u
do mesh (X,Y,c)
c should be a function of X,Y (should be generally in an equation
form) then ur mesh(X,Y,c) will work .
Otherwise it will give an error ..





Regards
Anshu





Tino Langer wrote:
>
>
> Hello,
>
> I try to plot a mesh, but everytime I get an error. I have 3 files
> (file1,
> file2, file3), every of them contains 1 column and n rows of
> several data.
> Now i want to plot the data so that x-axis contains the values of
> file1, the
> y-axis contains the value of file2 and the z-axis contains the
> values of
> file3.
>
> I tried the following:
>
> load file1.txt;
> a=file1;
>
> load file2.txt;
> b=file2;
>
> load file3.txt;
> c=file3;
>
> [X,Y] = meshgrid(a,b);
> mesh(X,Y,c);
>
> but an error occurs by function mesh
>
> thanx for help - Tino
>
>
>
0
Reply experteyes2002 (51) 10/18/2003 1:59:44 PM


Ok, it's a little bit strange. I have 11 results of an simulation. The
parameters are running from 0.5 to 3.5 in steps of 0.3. For each of this
sumulations exists one file with 2 colums and 42 rows. the first columns is
in each file the same - these are numbers from 0 to 120 in steps of 10. Only
the second column differs from file to file. No I want a mesh with the
values og 0.5 to 3.5 on the x-axis, the values from 0 to 120 on the y-axis
and the values from the second row of the files should be the z-axis.

But how to do this?

Thanx - Tino

"Anshu" <experteyes2002@yahoo.co.in> schrieb im Newsbeitrag
news:eec5b20.0@WebX.raydaftYaTP...
> Hi Tino ,
>
>
>           Could u please provide me some information about the files
> which u are using i.e file1,file2,file3.
> Well file3 i.e the one with the variable c should be a function of a
> and b .
>
>
> For example if i have a=-2:0.2:2 and
> b=-2:0.2:2 and u do [X,Y]=meshgrid(a,b) well it will work but when u
> do mesh (X,Y,c)
> c should be a function of X,Y (should be generally in an equation
> form) then ur mesh(X,Y,c) will work .
> Otherwise it will give an error ..
>
>
>
>
>
> Regards
> Anshu
>
>
>
>
>
> Tino Langer wrote:
> >
> >
> > Hello,
> >
> > I try to plot a mesh, but everytime I get an error. I have 3 files
> > (file1,
> > file2, file3), every of them contains 1 column and n rows of
> > several data.
> > Now i want to plot the data so that x-axis contains the values of
> > file1, the
> > y-axis contains the value of file2 and the z-axis contains the
> > values of
> > file3.
> >
> > I tried the following:
> >
> > load file1.txt;
> > a=file1;
> >
> > load file2.txt;
> > b=file2;
> >
> > load file3.txt;
> > c=file3;
> >
> > [X,Y] = meshgrid(a,b);
> > mesh(X,Y,c);
> >
> > but an error occurs by function mesh
> >
> > thanx for help - Tino
> >
> >
> >


0
Reply tino.langer (6) 10/18/2003 10:49:08 PM

2 Replies
43 Views

(page loaded in 0.043 seconds)

Similiar Articles:













7/22/2012 8:51:53 PM


Reply: