Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Reading in Data from an ASCII file

Author
Message
Keeling
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 10th Feb 2004 18:22
I am having a slight problem reading in data created with other programs. I am working on a n-body simulation with another programming language. I have been using GnuPlot to plot my 3d data. I would like to use DB to load this same data and allow the user to zoom around and while the bodies interact.

The data generated looks like this:

0.000000234 1.12000034 0.0000000023
0.000000256 1.12000037 0.0000000029

etc......

I can of course change the format. The problem I am having is reading this data into DB. I've used the Read Float command and I get garbage data. Is it possible to read ascii data in DB? (as opposed to it's native format).
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Feb 2004 18:34
You should try read string$(), and then convert it to a float value. I cant remember what the command is, but check in the maths help in your help files.

I would be unstoppable if I could just get started...

Login to post a reply

Server time is: 2024-09-21 20:49:54
Your offset time is: 2024-09-21 20:49:54