Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

The program isn't debugged until the last user is dead.


computers / comp.graphics.apps.gnuplot / Re: Hex 2 dec conversion

SubjectAuthor
* Hex 2 dec conversionRobert Vanpass
+- Re: Hex 2 dec conversionRobert Vanpass
+* Re: Hex 2 dec conversionHans-Bernhard_Bröker
|`- Re: Hex 2 dec conversionKarl Ratzsch
+- Re: Hex 2 dec conversionRobert Vanpass
`- Re: Hex 2 dec conversionRobert Vanpass

1
Subject: Hex 2 dec conversion
From: Robert Vanpass
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 11 Dec 2019 18:43 UTC
X-Received: by 2002:a05:620a:12c4:: with SMTP id e4mr4366327qkl.359.1576089822878;
Wed, 11 Dec 2019 10:43:42 -0800 (PST)
X-Received: by 2002:a05:6808:4cc:: with SMTP id a12mr4064987oie.115.1576089822553;
Wed, 11 Dec 2019 10:43:42 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!g89no4737279qtd.0!news-out.google.com!w29ni1021qtc.0!nntp.google.com!g89no4737269qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 11 Dec 2019 10:43:42 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:1811:d95:3100:d9e0:d4e0:3134:90fe;
posting-account=6Yi6UAoAAAAPa9I7jpXT9nwJvAd0_-hC
NNTP-Posting-Host: 2a02:1811:d95:3100:d9e0:d4e0:3134:90fe
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
Subject: Hex 2 dec conversion
From: robertva...@gmail.com (Robert Vanpass)
Injection-Date: Wed, 11 Dec 2019 18:43:42 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Hi,

I have a .csv datafile with only 2-digit numbers in Hexadecimal form:
6F
73
A5
....

Is there a function in Gnuplot to convert these Hex numbers to Decimal form,
or should it be written / how ?
Another possibility would be to use an external commandline converter, something like Grepwin.
Any idea what I could use for this ?

Thanks



Subject: Re: Hex 2 dec conversion
From: Robert Vanpass
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 11 Dec 2019 18:46 UTC
References: 1
X-Received: by 2002:ad4:4a14:: with SMTP id m20mr4560133qvz.100.1576090012084;
Wed, 11 Dec 2019 10:46:52 -0800 (PST)
X-Received: by 2002:a05:6830:145:: with SMTP id j5mr3220366otp.242.1576090011825;
Wed, 11 Dec 2019 10:46:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!aioe.org!peer03.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g89no4745107qtd.0!news-out.google.com!w29ni1021qtc.0!nntp.google.com!g89no4745094qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 11 Dec 2019 10:46:51 -0800 (PST)
In-Reply-To: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:1811:d95:3100:d9e0:d4e0:3134:90fe;
posting-account=6Yi6UAoAAAAPa9I7jpXT9nwJvAd0_-hC
NNTP-Posting-Host: 2a02:1811:d95:3100:d9e0:d4e0:3134:90fe
References: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c6d0899e-caab-4622-8ba7-e5f98bbdf5ad@googlegroups.com>
Subject: Re: Hex 2 dec conversion
From: robertva...@gmail.com (Robert Vanpass)
Injection-Date: Wed, 11 Dec 2019 18:46:52 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1800
X-Received-Body-CRC: 3152581481
View all headers
On Wednesday, December 11, 2019 at 7:43:44 PM UTC+1, Robert Vanpass wrote:
Hi,

I have a .csv datafile with only 2-digit numbers in Hexadecimal form:
6F
73
A5
...

Is there a function in Gnuplot to convert these Hex numbers to Decimal form,
or should it be written / how ?
Another possibility would be to use an external commandline converter, something like Grepwin.
Any idea what I could use for this ?
(I use Gnuplot 5.2.2 with Windows 10).


Thanks



Subject: Re: Hex 2 dec conversion
From: Hans-Bernhard_Bröke
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 11 Dec 2019 22:40 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!news.unit0.net!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail
From: HBBroe...@t-online.de (Hans-Bernhard_Bröker)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: Hex 2 dec conversion
Date: Wed, 11 Dec 2019 23:40:17 +0100
Lines: 29
Message-ID: <h5d9ihFn8o4U1@mid.dfncis.de>
References: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Trace: news.dfncis.de TYcUjbDFZtfWI+a5NpcmywgCCQ9BSMPEPAFGvBeGoX5FnPeuhUhvpEN9N/
Cancel-Lock: sha1:ohYG641pGG6TOKv/ClZY0CNToKw=
Autocrypt: addr=HBBroeker@t-online.de; keydata=
mQINBFu0018BEAC34KXenx8N+WV5OOk0YGkpMbnplVar2DFCNTIDEYA6d8S84mD2IB6/R29G
gmE0NNKwt5C0vFvETkF1K8iZlI6TxzmtmTMqQk5lGWnxbv02EsSJu4drIwQssCfYoZ0y3XhL
gUlZa2PrLvrEDI4HHeYCd87xagdsDX2+fBjMMBqnvYgyAU5UOhhG+R6s/8UtHlzyeJTLYXQQ
zYcOFpcX3Q7BsDQukVAhh8RW2ss44TrNmyxbd63dWlG7ZgW525PaA02PsHVSLQz7uIg38S/a
/wtB6VqzudvYwcekMyM/XSn/bxaUCHcGGfW81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ZKOJq0Bux
ExlUPGmviALMovHnE0V4RhheTPbaIIrvErL0vNZ/C5Ef69ciy/09ilyigYv5Kf9P59T7sv3E
O/Jx+VWs2ZHTmIOI5RggTZfh1jqjHVf/DDGcwDLWFwEtefg8jO8CnF/K3XGVdjRYBOnKL4ao
tqDMPJrR5d0JKgzxrCCkp76fz9pZB60XhZaEM8iZkUknulrSOVS+RQfatpLtc6I4laf39mNi
gJAx91jvpaTwvVMGZIcA3S+710LmNl+X+lWyymh9srSllmrjmCM=
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.3.0
In-Reply-To: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
Content-Language: de-DE
View all headers
Am 11.12.2019 um 19:43 schrieb Robert Vanpass:
Hi,

I have a .csv datafile with only 2-digit numbers in Hexadecimal form:
6F
73
A5
...

That has surprisingly few commas and semicolons for a csv file :-)

Is there a function in Gnuplot to convert these Hex numbers to Decimal form,
No.

There's the "send the data through an external program before use"
function, but that's not terribly useful if you know no external program
to do that kind of transformation job for you.

In the Unix environment gnuplot originally grew up in, it would work
roughly like this:

  plot "< awk -e '{printf \"%d\", strtonum (\"0x\" $1)) }' yourfile.csv"

If you do have an 'awk' command around, that should actually work even
on Windows.

OTOH, if it's actual CSV and you're on Windows, you might want to follow
the saying "when in Rome, do as the Romans" and just perform the
transformation in you preferred spreadsheet program...


Subject: Re: Hex 2 dec conversion
From: Karl Ratzsch
Newsgroups: comp.graphics.apps.gnuplot
Organization: solani.org
Date: Thu, 12 Dec 2019 21:10 UTC
References: 1 2
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: mail....@gmx.net (Karl Ratzsch)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: Hex 2 dec conversion
Date: Thu, 12 Dec 2019 22:10:49 +0100
Organization: solani.org
Lines: 27
Message-ID: <qsuaco$i2v$1@solani.org>
References: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
<h5d9ihFn8o4U1@mid.dfncis.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: solani.org 1576185048 18527 127.0.0.43 (12 Dec 2019 21:10:48 GMT)
X-Complaints-To: abuse@news.solani.org
NNTP-Posting-Date: Thu, 12 Dec 2019 21:10:48 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101
Thunderbird/60.9.1
Content-Language: de-DE-1901
X-User-ID: eJwFwYkBwCAIA8CVpBiecUjU/UfoHTwslDsQGw9v7lAuay5elFjN9HOPjuGrnpC8JnonSFs/QjIR7Q==
In-Reply-To: <h5d9ihFn8o4U1@mid.dfncis.de>
Cancel-Lock: sha1:zIB+9/G0r+BjVZ9BYfXaoQKmt5c=
View all headers
Am 11.12.2019 um 23:40 schrieb Hans-Bernhard Bröker:
Am 11.12.2019 um 19:43 schrieb Robert Vanpass:
I have a .csv datafile with only 2-digit numbers in Hexadecimal form:

Is there a function in Gnuplot to convert these Hex numbers to Decimal form,
No.

Actually yes. Gnuplot understands hexadecimal (and octal), the
number just needs a preceeding "0x" (or "0") marker. You just have
to add it in your "using" statement, and then take advantage of
gnuplot´s automatic type promotion:

$dat << EOD
11c 4
12a 5
133 4
13f 6
1aa 1
EOD

pl $dat us (("0x".strcol(1))*1):2 w l

Admittedly, I was very doubtful too before seeing the above example
actually producing a plot. ;)





Subject: Re: Hex 2 dec conversion
From: Robert Vanpass
Newsgroups: comp.graphics.apps.gnuplot
Date: Sat, 14 Dec 2019 19:28 UTC
References: 1
X-Received: by 2002:a37:4d16:: with SMTP id a22mr20096649qkb.237.1576351726855;
Sat, 14 Dec 2019 11:28:46 -0800 (PST)
X-Received: by 2002:a9d:7a88:: with SMTP id l8mr22809785otn.187.1576351726552;
Sat, 14 Dec 2019 11:28:46 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!g89no3228091qtd.0!news-out.google.com!w29ni1400qtc.0!nntp.google.com!g89no3228080qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Sat, 14 Dec 2019 11:28:46 -0800 (PST)
In-Reply-To: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:1811:d95:3100:186e:fc26:a1ac:d266;
posting-account=6Yi6UAoAAAAPa9I7jpXT9nwJvAd0_-hC
NNTP-Posting-Host: 2a02:1811:d95:3100:186e:fc26:a1ac:d266
References: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <91fdf43f-0538-4495-bce9-0814cfb2b8cb@googlegroups.com>
Subject: Re: Hex 2 dec conversion
From: robertva...@gmail.com (Robert Vanpass)
Injection-Date: Sat, 14 Dec 2019 19:28:46 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
On Wednesday, December 11, 2019 at 7:43:44 PM UTC+1, Robert Vanpass wrote:
Hi,

I have a .csv datafile with only 2-digit numbers in Hexadecimal form:
6F
73
A5
...

Is there a function in Gnuplot to convert these Hex numbers to Decimal form,
or should it be written / how ?
Another possibility would be to use an external commandline converter, something like Grepwin.
Any idea what I could use for this ?

Thanks

This works perfectly.

Thank you so much !


Subject: Re: Hex 2 dec conversion
From: Robert Vanpass
Newsgroups: comp.graphics.apps.gnuplot
Date: Sun, 15 Dec 2019 07:19 UTC
References: 1
X-Received: by 2002:a0c:e84d:: with SMTP id l13mr21252443qvo.53.1576394380658;
Sat, 14 Dec 2019 23:19:40 -0800 (PST)
X-Received: by 2002:a05:6830:1e30:: with SMTP id t16mr25498478otr.220.1576394380349;
Sat, 14 Dec 2019 23:19:40 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!g89no4727333qtd.0!news-out.google.com!w29ni1485qtc.0!nntp.google.com!g89no4727327qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Sat, 14 Dec 2019 23:19:39 -0800 (PST)
In-Reply-To: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:1811:d95:3100:71d7:9923:fa76:e3db;
posting-account=6Yi6UAoAAAAPa9I7jpXT9nwJvAd0_-hC
NNTP-Posting-Host: 2a02:1811:d95:3100:71d7:9923:fa76:e3db
References: <97645b00-a063-4b6e-a994-90622b875eca@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <934524b4-9219-4aa2-9cff-2a3445024989@googlegroups.com>
Subject: Re: Hex 2 dec conversion
From: robertva...@gmail.com (Robert Vanpass)
Injection-Date: Sun, 15 Dec 2019 07:19:40 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
On Wednesday, December 11, 2019 at 7:43:44 PM UTC+1, Robert Vanpass wrote:
Hi,

I have a .csv datafile with only 2-digit numbers in Hexadecimal form:
6F
73
A5
...

Is there a function in Gnuplot to convert these Hex numbers to Decimal form,
or should it be written / how ?
Another possibility would be to use an external commandline converter, something like Grepwin.
Any idea what I could use for this ?

Thanks

Actually this is very intriguing to me:

I tried to find this info myself in
- the basic Gnuplot reference (Gnuplot helpfiles)
- Gnuplot in action (Philipp K. Janert)
- Gnuplot cookbook (Lee Phillips)
but couldn't find anything like that.

Where else could I look to learn tings like this ?
(From time to time I'm really stuck, so you might see more posts from me...)

Thanks


1
rocksolid light 0.7.2
clearneti2ptor