The statement "for i = n:-1:j" in MATLAB defines a for loop that initializes the variable i to n and decrements it by 1 in each iteration until it reaches the value of j. The loop executes its body for each value of i from n down to j. This structure allows for backward iteration within a specified range. For further details, reference the MATLAB documentation on for loops.
It's the header of a for loop. i takes on the value of n initially; the loop body (which you haven't shown) is executed; i changes by -1; and the loop repeats until i and j are equal.
As you can see from the image here, when I graph the 2d graph of y = 5sin(1/x), it comes out like I'd expect. However, when I graph it in a 3d graph, it doesn't look right at all. Can someone tell me why it isn't displaying right, or is it and I'm just missing something when I add the z axis?