cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Functions not evaluating the range of values

SFares
12-Amethyst

Functions not evaluating the range of values

Hello,

please scroll down in the attached sheet where i start to evaluate the function for a certain range, then i need to put the results in a vector format so i can use some of the values inside the vector. i am not sure why the functions are not evaluating the variables in the range. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
MikeArmstrong
5-Regular Member
(To:SFares)

How about the attached?

I have done away with the range variable by converting it to a vector using a user defined function 'vec'.

I have also changed ORIGIN to zero after the list boxes, I would recommend keeping it at zero in the future.

View solution in original post

3 REPLIES 3
MikeArmstrong
5-Regular Member
(To:SFares)

How about the attached?

I have done away with the range variable by converting it to a vector using a user defined function 'vec'.

I have also changed ORIGIN to zero after the list boxes, I would recommend keeping it at zero in the future.

Mike,

what was wrong with what i was doing? i thought function evaluation of variables in a rane is an easy thing and i did it before. do you see any thing wrong with what i did? i like your method. Thanks!

MikeArmstrong
5-Regular Member
(To:SFares)

sameer fares wrote:

what was wrong with what i was doing? i thought function evaluation of variables in a rane is an easy thing and i did it before. do you see any thing wrong with what i did?

Range variables are implicit for loops and not data structures like vectors. You may want to read the articles by Stuart I posted http://communities.ptc.com/docs/DOC-6073 here to better understand the difference between ranges and vector and how ranges should be used.

Top Tags