I recently posted about a problem I had with an iterative scheme in 2 dimensions.. someone answered that and it worked perfectly:)
I've now moved on to a slightly more complicated version. It's in 3d but only the r and z values will be used in the iteration (trying to get the catenary)
so it's not as hard as the main problem that I'm building towards.
Basically, I'm having trouble converting the points to polar coordinates and assigning them each a [j] value, even though I've solved a similar problem at a different time. I can't spot the problem, so if anyone could tell me why this isn't working I'd be very thankful.