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

## Function problem  5-Regular Member

## 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. 1 ACCEPTED SOLUTION

Accepted Solutions  24-Ruby V
(To:Werner_E)

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

5 REPLIES 5  24-Ruby V

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

See if the attached helps.  24-Ruby V
(To:Werner_E)

This should solve the problem with the first, hard coded, point.  24-Ruby V
(To:Werner_E)

And here is a problem which should let you think about the algorithm you implemented.  5-Regular Member
(To:Werner_E)

I fixed it, with the considerations you gave me (I hope you do not have any errors now), thank you very much  24-Ruby V   