×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

For Loops

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.

RE: For Loops

Dear msmiley

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources