For Loops
For Loops
(OP)
I want to create a for loop that will take information from one Excel database colum and enter it into Mathcad. I then want to manipulate the data the way I want and enter the new data into a new Excel database.
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: For Loops
I use MATHSERV, which you can get from:
http://www.engs-comp.com/mathserv/
This is a powerful BASIC interpreter that works from any document. For example, after creating a .csv file from Excel with three lines and four columns filled by consecutive numbers, I typed the following into Notepad:
chdir "\My Documents"
TEST = fileq("ectest1.csv", _exists) := 1
NUM = freefile := 7
fileopen(NUM, "ectest1.csv")
while not fileeof(NUM)
fileread(NUM, a)
print a
end while
1,2,3,4
5,6,7,8
9,10,11,12
fileclose(NUM)
clear MAT
MAT[1,1:4] = {1,2,3,4}
MAT[2,1:4] = {5,6,7,8}
MAT[3,1:4] = {9,10,11,12}
print MAT
1 2 3 4
5 6 7 8
9 10 11 12
Now that MAT is set up, you have the full range of an extended set of BASIC commands at your disposal, including matmult, matinvert and mattranspose.
Please let me know waht you think.
Helmut
engcomp@pbq.com.au