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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Iterate variables in vector 1

Status
Not open for further replies.

carbon787

Aerospace
Joined
Dec 9, 2010
Messages
1
Location
US
Hello,
Are there any examples of including functions of several variables in a program to perform integrations over a vector? Maybe attachment can explain better. Can't get the program to iterate over different f(x) functions to perform the integration.

Thanks
 
The problem is the first line of the for loop

z <- z[k

Change z to any other letter and it executes. The trouble is that within the program, the first time the loop executes, it re-defines z as a scalar (equal to z[1 ). The second time through the loop it sees that z is a scalar (there is no z[2 within the scope of the program after the first loop) and hangs.

Peter
 
 http://files.engineering.com/getfile.aspx?folder=2cbe74a0-5bf1-4a5f-9136-a6704a4b9183&file=program_post_v2.xmcd
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top