[pstricks] Accessing individual members of a data set
Jorge Nto
jorgento at gmail.com
Wed Dec 9 21:48:47 CET 2009
Hi!
I was wondering how I can reference and get a selected line of a dat file (2
or more columns).
To be more precise: I store the start and goal positions of a path planner
as the two first lines of my data file
the third is a pair: first column <- radius of goal zone and second column<-
the radius of the robot
%MyData.dat
%Start position
0.0 0.0
%Goal position
2.3 3.5
%Goal and robot radius
0.2 0.3
(of course %comments should be ignored).
So I should read sequentially: First line (startX, startY) then read the
third line,second column to get the radius and with that info draw a circle.
Then repeat for the second line
I could think about using three columns the radii information for each line,
like
%start pos. and radius of robot
0.0 0.0 0.2
%goal pos and radius
2.3 3.5 0.3
I would like to use a function, say plotCircles like
\readdata{\data}{C:/mydata.dat}
\plotCircles{\data}
If the file does not exist then plotCircles should do nothing.
Anyway I would be grateful for every piece of advice on this.
Regards
Jorge
(aus Hannover)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20091209/7b38744d/attachment.html>
More information about the PSTricks
mailing list