Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4276
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Karl Ratzsch <mail.kfr@gmx.net> |
| 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> (permalink) |
| 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= |
| Xref | csiph.com comp.graphics.apps.gnuplot:4276 |
Show key headers only | View raw
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. ;)
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Hex 2 dec conversion Robert Vanpass <robertvanpass@gmail.com> - 2019-12-11 10:43 -0800
Re: Hex 2 dec conversion Robert Vanpass <robertvanpass@gmail.com> - 2019-12-11 10:46 -0800
Re: Hex 2 dec conversion Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2019-12-11 23:40 +0100
Re: Hex 2 dec conversion Karl Ratzsch <mail.kfr@gmx.net> - 2019-12-12 22:10 +0100
Re: Hex 2 dec conversion Robert Vanpass <robertvanpass@gmail.com> - 2019-12-14 11:28 -0800
Re: Hex 2 dec conversion Robert Vanpass <robertvanpass@gmail.com> - 2019-12-14 23:19 -0800
csiph-web