Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi
I have tried to create a program that calculates a function for each value in the vector, but the result is not being saved for each loop. What am I doing wrong? Thanks for your help.
Solved! Go to Solution.
You just need to change "For" statement to make "i" a real range (not just 3),.
You just need to change "For" statement to make "i" a real range (not just 3),.
Thank you!
You could avoid any programming and loops
Vectorization (the arrow over the expression) is not mandatory here but I it good style to use it whenever a scalar calculation is applied to the elements of a vector. In case of your example we sure can see it as a vector calculation and omit vectorisation.