From: Monica Chon on
Hi,

I am very new to matlab. I have made many 2D-power spectrum plots of frequency vs. amplitude on matlab from data. In fact I have 64 seperate plots, each one showing a plot from select files of data from a series of planes numbered 0-63. So the first plot is plane 0, the second, is plane 1 and so on.

I wanted to plot all 64 of these plots in one 3D-plot with the new z-axis being the planes. So the first 2D power spectrum plot would be on 0 of the z-axis, the second would be on 1 of the z-axis and so on. Basically I want to combine the files of data of the planes into a variable on the z-axis so that I can plot my data in 3D.

I hope that makes some sense. I would appreciate any help on this task I can't figure out how to do.

Thanks
From: Alan B on
"Monica Chon" <yunachon(a)yahoo.com> wrote in message <i1n2jd$4p5$1(a)fred.mathworks.com>...
> Hi,
>
> I am very new to matlab. I have made many 2D-power spectrum plots of frequency vs. amplitude on matlab from data. In fact I have 64 seperate plots, each one showing a plot from select files of data from a series of planes numbered 0-63. So the first plot is plane 0, the second, is plane 1 and so on.
>
> I wanted to plot all 64 of these plots in one 3D-plot with the new z-axis being the planes. So the first 2D power spectrum plot would be on 0 of the z-axis, the second would be on 1 of the z-axis and so on. Basically I want to combine the files of data of the planes into a variable on the z-axis so that I can plot my data in 3D.
>
> I hope that makes some sense. I would appreciate any help on this task I can't figure out how to do.
>
> Thanks

Something like this?

freq=-5:4;
plane=meshgrid(1:10);
amp=randn(10);

plot3(freq,plane,amp)
From: Monica Chon on
"Alan B" <monguin61REM(a)OVETHIS.yahoo.com> wrote in message <i1n5j2$lt4$1(a)fred.mathworks.com>...
> "Monica Chon" <yunachon(a)yahoo.com> wrote in message <i1n2jd$4p5$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I am very new to matlab. I have made many 2D-power spectrum plots of frequency vs. amplitude on matlab from data. In fact I have 64 seperate plots, each one showing a plot from select files of data from a series of planes numbered 0-63. So the first plot is plane 0, the second, is plane 1 and so on.
> >
> > I wanted to plot all 64 of these plots in one 3D-plot with the new z-axis being the planes. So the first 2D power spectrum plot would be on 0 of the z-axis, the second would be on 1 of the z-axis and so on. Basically I want to combine the files of data of the planes into a variable on the z-axis so that I can plot my data in 3D.
> >
> > I hope that makes some sense. I would appreciate any help on this task I can't figure out how to do.
> >
> > Thanks
>
> Something like this?
>
> freq=-5:4;
> plane=meshgrid(1:10);
> amp=randn(10);
>
> plot3(freq,plane,amp)




Yes! that's the gist of what I am trying to do. Except my freq=0:2*10^4. Unfortunately I can't figure out how to get my data to appear that way. Do you know how to combine all my data files in order to make the planes 0-63 appear on different numbers on the z-axis. Sorry, if i'm asking obvious questions, I'm really new to matlab.

Thanks
From: Alan B on
"Monica Chon" <yunachon(a)yahoo.com> wrote in message <i1n94o$i8e$1(a)fred.mathworks.com>...
> "Alan B" <monguin61REM(a)OVETHIS.yahoo.com> wrote in message <i1n5j2$lt4$1(a)fred.mathworks.com>...
> > "Monica Chon" <yunachon(a)yahoo.com> wrote in message <i1n2jd$4p5$1(a)fred.mathworks.com>...
> > > Hi,
> > >
> > > I am very new to matlab. I have made many 2D-power spectrum plots of frequency vs. amplitude on matlab from data. In fact I have 64 seperate plots, each one showing a plot from select files of data from a series of planes numbered 0-63. So the first plot is plane 0, the second, is plane 1 and so on.
> > >
> > > I wanted to plot all 64 of these plots in one 3D-plot with the new z-axis being the planes. So the first 2D power spectrum plot would be on 0 of the z-axis, the second would be on 1 of the z-axis and so on. Basically I want to combine the files of data of the planes into a variable on the z-axis so that I can plot my data in 3D.
> > >
> > > I hope that makes some sense. I would appreciate any help on this task I can't figure out how to do.
> > >
> > > Thanks
> >
> > Something like this?
> >
> > freq=-5:4;
> > plane=meshgrid(1:10);
> > amp=randn(10);
> >
> > plot3(freq,plane,amp)
>
>
>
>
> Yes! that's the gist of what I am trying to do. Except my freq=0:2*10^4. Unfortunately I can't figure out how to get my data to appear that way. Do you know how to combine all my data files in order to make the planes 0-63 appear on different numbers on the z-axis. Sorry, if i'm asking obvious questions, I'm really new to matlab.
>
> Thanks

Well, I have no idea what format your data files are. You might have some luck starting here: http://matlabwiki.mathworks.com/MATLAB_FAQ#How_can_I_process_a_sequence_of_files.3F

If you already know how to read them into a Matlab array, then simply read all 64 files into rows of a single 2D array.