[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Extracting data for multiple plots from text files

From: Jens Benecke
Subject: Extracting data for multiple plots from text files
Date: Thu, 23 Nov 2006 15:12:23 +0100
User-agent: KNode/0.10.4


I'm using octave 2.1.72 on SuSE Linux. I am trying to extract and plot
simulation data from a SPICE output file that contains multiple plots in
the following format:

Line 1: Header
Line 2: Title for Plot 1
Lines 2..n: Data for Plot 1
Line n+1: Title for Plot 1 (starts with "Step ...")
Line n+2..m: Data for plot 2

The format verbatim looks like this, where each line contains

        frequency    realpart,imagpart
or      frequency    magnitude,phase

each in scientific notation. (This depends on the application that writes
these files and its settings)

I would only need this data in a multicolumn matrix, since the first column
(frequencies) is always the same, to be able to plot and work with them.
I have experimented a lot with the regexp parsing functions in Octave and
Matlab and haven't yet managed to get something working that is fast enough
to read in multiple-MB files.

Perhaps somebody can help? That would be awesome.
Even more awesome would be Matlab compatability. ;-)

Here's an example file (header):

Freq.   I(V_dpo)
Step Information: L_ak_o=1.4 L_ak_u=1.2  (Run: 1/9)
1.00000e+005    -3.11759e-002,9.14407e-002
1.02329e+005    -2.99432e-002,8.97526e-002
1.04713e+005    -2.87557e-002,8.80795e-002
1.07152e+005    -2.76122e-002,8.64223e-002
1.09648e+005    -2.65113e-002,8.47818e-002
1.12202e+005    -2.54520e-002,8.31588e-002
1.14815e+005    -2.44328e-002,8.15540e-002
1.17490e+005    -2.34526e-002,7.99679e-002
1.20226e+005    -2.25102e-002,7.84011e-002
1.23027e+005    -2.16044e-002,7.68541e-002

Thanks a lot!!

Jens Benecke
Please do not carbon copy me, I read the lists I post in!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]