[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to plot two graphs with a textfile with a textdocument with two
From: |
Macy |
Subject: |
Re: How to plot two graphs with a textfile with a textdocument with two x two columns? |
Date: |
Sat, 15 Mar 2014 07:55:35 -0700 |
Not sure I understood your 'total' problem.
If it's not too difficult to remove that pesky text header, or better yet,
change the source to write the files' headers to make them octave compatible.
If stuck with useless header, take the first file, open it with a text editor,
remove everything but the data, then save as A.txt and the other as B.txt
then
>> load -force A.txt;load -force B.txt;
>> tA=A(:,1)': A=A(:,2)';
>> tB=B(:,1)'; B=B(:,2)';
then plot appropriately
I use:
>> plot(tA, A);
>> hold on; plot(tB, B); hold off;
that way you overlay them
but tA is always tB then throw away and just use t.
>> t=A(:,1)';
for interesting effect you can also
>> plot(log10(t/tref), 20*log10(A) );
where tref 'marks' itself at 0 on your plot.
--- address@hidden wrote:
From: Conrad Kopernikus <address@hidden>
To: address@hidden
Subject: How to plot two graphs with a textfile with a textdocument with two
x two columns?
Date: Fri, 14 Mar 2014 14:42:05 -0700 (PDT)
Dear Community,
with some physic experiments with picoscope I get a textfile (.txt) with two
columns. But I have to graphs. My textfile look a littlebit like that:
Channel A
Time Value
(ms) (mV)
3 6305
19 6178
34 6081
50 5905
66 5758
81 5641
97 5592
112 5573
Channel B
Time Value
(ms) (mV)
3 8864
19 8796
34 8786
50 8786
66 8816
81 8786
97 8786
112 8737
The columns are larger in reality. But how to plot that? I delete the text
and copy the columns for the first graph in a new text-file and the second
in a new text-file. I load both textfiles use the x1=(:,1) and get a plot
like: plot(x1,y1,x2,y2). That works. But is their a faster way to do that?
Can I just use one and same textfile ... but just say to octave it should
make to graphs instead of connecting them?
Please, I need help :-)
Greatful regards,
Conrad
--
View this message in context:
http://octave.1599824.n4.nabble.com/How-to-plot-two-graphs-with-a-textfile-with-a-textdocument-with-two-x-two-columns-tp4663084.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: How to plot two graphs with a textfile with a textdocument with two x two columns?,
Macy <=