Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with a table

Status
Not open for further replies.

Hayate21

Programmer
May 9, 2010
2
AT
Hi everyone. I'm new to the forums and want to start with a question:

I have to work with many large tables and most of what I need can be done with Excel or Numbers (Apple), but I want to optimize my work. I have written some programs for computational physics, but when it comes to work with text files and arrays my knowledge is quite limited.
What I need is some help with that. For example I need to do the following:

I have a large table with a lot of values in it. Say 10 columns and 3000 lines. Now I have to investigate this table. For example I want to know how many lines contain a value between 19 and 20 in the 5th column. (These are just some random numbers...), or I want to scan the table interactively, say I want to scan for the number of lines which contain a value of 19 to 20 in the 5th column, then the number of lines which contain a value of 19.1 to 20.1...19.2 - 20.2 and so on.

I hope you can give me some starting point where I can begin my research on that topic or you could give me a basic code for what I have to write.

thanks
cheers
;)
 
You can process process your data file at 2 ways:
1. Read the file line by line and process it
or
2. First read the data from the file into array(s) (for example: one matrix of dimension 3000 x 5, or five vectors of size 3000) and then process them.

IMHO, in your case - if you only need to know the number of lines, which contains the specific values - the first approach suffices.
 
Thanks

My programs are already running and everything is fine. ;)

cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top