Sponsored Content
Full Discussion: Read in Table as a matrix
Top Forums Shell Programming and Scripting Read in Table as a matrix Post 302663147 by servuskelb on Wednesday 27th of June 2012 03:45:14 PM
Old 06-27-2012
here is a part of the input file
Code:
  Lon    Lat      1990    1991   1992   1993
-10.75  51.25    58.0    51.0    52.6    55.0 #st1
-9.25  40.75    58.0    51.0    52.6    55.0   #st2
-8.25  54.25    74.5    82.2    67.6    67.8   #st3
-7.25  51.75    57.0    55.6    54.8    54.8   #st4
-7.25  51.75    57.0    55.6    54.8    54.8   #st5
-7.25  54.25    79.2    85.2    68.6    74.8    #st6
-6.75  52.75    58.5    66.8    60.8    63.6    #st7
-1.25  50.75    66.5    70.2    63.0    57.0    #st8
-0.75  48.75    67.5    70.0    64.8    58.4    #st9
2.75  50.75    79.5    82.8    74.4    63.2      #st10

i'd like to plot the years on x-axis and the value of st[1..10] on the y-axis with line via gnuplot. Therefore, i need to split the table in a 2 dimensional array as sgs(year,st1..10)

Last edited by Franklin52; 06-28-2012 at 04:38 AM.. Reason: Please use code tags for data and code samples
 

8 More Discussions You Might Find Interesting

1. Solaris

Need some lib in c/c++ to read db table at one go

Hi All, I need some sort of library or module which read the db table at one go and keep in process memory.My problem is that I have a call processing module which handles the network call and goes for db lookup for subscriber profile in oracle db for every call.I am using Oracle Standard Edition... (0 Replies)
Discussion started by: unisuraj
0 Replies

2. Shell Programming and Scripting

Is it possible to draw table/matrix using shell script?

Hi all, I need to create a matrix of variable rows and columns. Right now i have 3 rows and two columns and following values. Output something like TypeA TypeB TestCase1 Pass Fail TestCase2 Pass ... (2 Replies)
Discussion started by: jakSun8
2 Replies

3. UNIX for Dummies Questions & Answers

Teradate table read?

i have to read some data from a teradata table and use them in my shell script.. how do i do that.. we can use BTEQ .. but i don know how to pass the field values as variables to the shell.. please help me.... (8 Replies)
Discussion started by: depakjan
8 Replies

4. HP-UX

how to read routing table

Hi all, Could someone please explain to me how I should read this routing table, # netstat -rn Routing tables Destination Gateway Flags Refs Interface Pmtu 127.0.0.1 127.0.0.1 UH 0 lo0 32808 10.222.47.82 10.222.47.82 UH... (3 Replies)
Discussion started by: rachael
3 Replies

5. Shell Programming and Scripting

Table to Matrix

Hi, I have a table in the format: 1 0 -1 1 0 2 0 1 -1 0 0 0 3 0 1 1 0 0 0 0 0 0 etc. I am trying to input this to a program, however it is complaining about the fact that it is not in matrix format. How do I add 0's to end of the rows to make them even? Thanks in advance! (2 Replies)
Discussion started by: Rhavin
2 Replies

6. Shell Programming and Scripting

How to sort matrix table in UNIX?

Hello All, i have a file sort.txt with below entries. 1 12 10 16 6 4 20 8 15 i need to sort these entries and the out put should come in a single line. 1 4 6 8 10 12 15 16 20 Can you please help me sort this out? (2 Replies)
Discussion started by: sureshk_85
2 Replies

7. Shell Programming and Scripting

awk to convert table-by-row to matrix table

Hello, I need some help to reformat this table-by-row to matrix? infile: site1 A:o,p,q,r,s,t site1 C:y,u site1 T:v,w site1 -:x,z site2 A:p,r,t,v,w,z site2 C:u,y site2 G:q,s site2 -:o,x site3 A:o,q,s,t,u,z site3 C:y site3 T:v,w,x site3 -:p,routfile: SITE o p q r s t v u w x y... (7 Replies)
Discussion started by: yifangt
7 Replies

8. UNIX for Beginners Questions & Answers

Read Table in file and split

HELLO I need your help please , i need to read a file that contain a table like : Name | Status ------------------ DB 1 | UP DB 2 | UP DB 3 | DOWN DB 4 | UP DB 5 | UP the objective to read each line and check if DB is UP or Down and give me the name of Down database.... (10 Replies)
Discussion started by: Abdellah
10 Replies
GLUCYLINDER(3G) 						   OpenGL Manual						   GLUCYLINDER(3G)

NAME
gluCylinder - draw a cylinder C SPECIFICATION
void gluCylinder(GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); PARAMETERS
quad Specifies the quadrics object (created with gluNewQuadric()). base Specifies the radius of the cylinder at z = 0. top Specifies the radius of the cylinder at z = height. height Specifies the height of the cylinder. slices Specifies the number of subdivisions around the z axis. stacks Specifies the number of subdivisions along the z axis. DESCRIPTION
gluCylinder draws a cylinder oriented along the z axis. The base of the cylinder is placed at z = 0 and the top at z = height. Like a sphere, a cylinder is subdivided around the z axis into slices and along the z axis into stacks. Note that if top is set to 0.0, this routine generates a cone. If the orientation is set to GLU_OUTSIDE (with gluQuadricOrientation()), then any generated normals point away from the z axis. Otherwise, they point toward the z axis. If texturing is turned on (with gluQuadricTexture()), then texture coordinates are generated so that t ranges linearly from 0.0 at z = 0 to 1.0 at z = height, and s ranges from 0.0 at the +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the +y axis. SEE ALSO
gluDisk(), gluNewQuadric(), gluPartialDisk(), gluQuadricTexture(), gluSphere() COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. AUTHORS
opengl.org opengl.org 06/10/2014 GLUCYLINDER(3G)
All times are GMT -4. The time now is 10:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy