Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1581 > unrolled thread

Applying arithmetic to a computed column

Started byPete Gregory <pgnewsg@bushlitt.org>
First post2013-01-24 09:20 -0500
Last post2013-01-24 14:49 -0500
Articles 3 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  Applying arithmetic to a computed column Pete Gregory <pgnewsg@bushlitt.org> - 2013-01-24 09:20 -0500
    Re: Applying arithmetic to a computed column Karl <mail.kfr@gmx.net> - 2013-01-24 17:45 +0100
      Re: Applying arithmetic to a computed column Pete Gregory <pgnewsg@bushlitt.org> - 2013-01-24 14:49 -0500

#1581 — Applying arithmetic to a computed column

FromPete Gregory <pgnewsg@bushlitt.org>
Date2013-01-24 09:20 -0500
SubjectApplying arithmetic to a computed column
Message-ID<kdrg03$6ea$1@dont-email.me>
Salutations

I have a simple script that plots different columns and blocks using the 
looping capabilities in gnuplot4.6 (and many thanks to those who coded 
it up).

in the loop I have
plot 'myfile' using rfchan index dut with lines {etc etc}
where rfchan and dut are for loop variables.

This works perfectly other than I realize now it would be better scaled 
in mA rather than A.   Were I using just column 2 (say), it would be easy

plot '' using ($2*1000) {etc etc}

but (rfchan*1000) will resolve to looking for column  (rfchan*1000).

Is there an easy way to do both the computed column and value multiply ?

TIA
Pete

[toc] | [next] | [standalone]


#1584

FromKarl <mail.kfr@gmx.net>
Date2013-01-24 17:45 +0100
Message-ID<kdrols$74s$1@news.rz.uni-karlsruhe.de>
In reply to#1581
I´d say you want to use

plot for [i=1:10] "" using(column(i)*1000)

, if i understood you problem correctly.

Regards,

  Karl


Am 24.01.2013 15:20, schrieb Pete Gregory:
> Salutations
> 
> I have a simple script that plots different columns and blocks using the
> looping capabilities in gnuplot4.6 (and many thanks to those who coded
> it up).
> 
> in the loop I have
> plot 'myfile' using rfchan index dut with lines {etc etc}
> where rfchan and dut are for loop variables.
> 
> This works perfectly other than I realize now it would be better scaled
> in mA rather than A.   Were I using just column 2 (say), it would be easy
> 
> plot '' using ($2*1000) {etc etc}
> 
> but (rfchan*1000) will resolve to looking for column  (rfchan*1000).
> 
> Is there an easy way to do both the computed column and value multiply ?
> 
> TIA
> Pete

[toc] | [prev] | [next] | [standalone]


#1586

FromPete Gregory <pgnewsg@bushlitt.org>
Date2013-01-24 14:49 -0500
Message-ID<kds38j$5rr$1@dont-email.me>
In reply to#1584
You understood it correctly and that works perfectly

Many thanks
Pete


On 2013:01:24 11:45 , Karl wrote:
> I´d say you want to use
>
> plot for [i=1:10] "" using(column(i)*1000)
>
> , if i understood you problem correctly.
>
> Regards,
>
>    Karl
>
>
> Am 24.01.2013 15:20, schrieb Pete Gregory:
>> Salutations
>>
>> I have a simple script that plots different columns and blocks using the
>> looping capabilities in gnuplot4.6 (and many thanks to those who coded
>> it up).
>>
>> in the loop I have
>> plot 'myfile' using rfchan index dut with lines {etc etc}
>> where rfchan and dut are for loop variables.
>>
>> This works perfectly other than I realize now it would be better scaled
>> in mA rather than A.   Were I using just column 2 (say), it would be easy
>>
>> plot '' using ($2*1000) {etc etc}
>>
>> but (rfchan*1000) will resolve to looking for column  (rfchan*1000).
>>
>> Is there an easy way to do both the computed column and value multiply ?
>>
>> TIA
>> Pete
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web