Skip to main content
1-Visitor
July 20, 2018
Solved

Function problem

  • July 20, 2018
  • 1 reply
  • 2786 views

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

Best answer by Werner_E

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

1 reply

25-Diamond I
July 21, 2018

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

See if the attached helps.

25-Diamond I
July 21, 2018

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