Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi, could someone help me figuring out where I made a mistake in my iteration program? I would like to return a value c for every element from the input matrix, but the output shows only one value so far. I have highlighted the question in the attached sheet. Thank you!
Solved! Go to Solution.
In your program you store all results in the very same variable c, one iteration overwriting the value of the previous one. You have to collect the results in a matrix. Furthermore you were missing any initialization of c. I guessed that it should be initialized in the inner loop.
Hope this is something you looking:
In your program you store all results in the very same variable c, one iteration overwriting the value of the previous one. You have to collect the results in a matrix. Furthermore you were missing any initialization of c. I guessed that it should be initialized in the inner loop.
Hope this is something you looking:
O yes, that looks like what I needed. Thank you very much 🙂
Remark:
I may be wrong, but isn't this simple calculation doing the very same (just with a better precision than just 0,01 in)???
Yes you are right, thanks for adding that. I've been practicing more programming lately, so hadn't considered your easier solution to be honest.