Skip to main content
1-Visitor
Jul 20, 2018 11:39 PM UTC
Solved

Function problem

Greetings.


I can not get my "Ncoor" function to work, his work is the same as the program on the right (which has "x3i y3i" as a result), but I can not store the result in "x4i y4i" (as seen in the sheet ).

In summary what is expected is that the vectors x3, y3 should be equal to x4, y4 (as verification), but made with a function, where the value of "af" can change.

 

As well:
The program is used to find the coordinates of a figure given a line (given by the value "af") that cuts the figure from above, the problem is that I never get the first point (0,0) that should be (0.263, 0.7) m, for this case of coordinates, and for any case of coordinates it takes the value of the last point.

 

Only those two questions, thank you.Smiley Happy

Werner_E
Werner_EAnswer
25-Diamond I
Jul 21, 2018 2:04 AM UTC

And here is a problem which should let you think about the algorithm you implemented.

5 replies

Werner_E
25-Diamond I
Jul 21, 2018 1:38 AM UTC

In a program you don't use ranges but for-loops.

See if the attached helps.

Translate
Werner_E
25-Diamond I
Jul 21, 2018 2:01 AM UTC

This should solve the problem with the first, hard coded, point.

Translate