Re: ListPlot and List problem
- To: mathgroup@smc.vnet.net
- Subject: [mg10912] Re: [mg10814] ListPlot and List problem
- From: seanross@worldnet.att.net
- Date: Thu, 12 Feb 1998 20:15:55 -0500
- References: <199802110201.VAA13558@smc.vnet.net.>
Lars Freund wrote: > > Hi, > > I want to plot data that is stored in a file having in the format: > > <frequence> <phase> <amplification> > > and want to plot the BODE-Diagram. So I did: > > myData = ReadList["filename",{Number, Number, Number}]; > > and now want a plot from <phase> over <frequence> and <amplification> > over <frequence>I tried things like > > ListPlot[Transpose[testData][[3]],PlotJoined->True] > > but I always got the wrong list-format. I need > > {freqence1,phase1},{freqence2, phase2}... > > and I always get things like > > {phase1, phase2, phase3} or so. > > Can anybody help me a bit? > > Thanks, > > Lars Assuming myData is a 3xn matrix and you want a 2xn matrix using the first two columns, Then Transpose[{Transpose[myData][[1]],Transpose[myData][[2]]}] should do the trick. -- Remove the _nospam_ in the return address to respond.
- References:
- ListPlot and List problem
- From: lafreund@cip.e-technik.uni-erlangen.de (Lars Freund)
- ListPlot and List problem