ERROR in SPH2CART2D function help in package matgeom, Octave 6.1

The ERROR is found in SPH2CART2D function help (package matgeom, Octave 6.1).

Namely, wrong order of input args is pointed out in the second variant of SPH2CART2D function call.

The correct order of the input args in both cases are similar:

  1. [X, Y, Z] = SPH2CART2(THETA, PHI, RHO);
  2. C = SPH2CART2(S); # where S = [THETA PHI RHO] and C = [X Y Z]

so, looking at the help and the code, you are correct.

the help does show that the input order should be (theta, phi, rho), except when passed as a single array S. in that case it specifies [phi, theta, rho].

looking in the code, in both cases the order is (theta, phi, rho). From comments in the code looks like there was an order change in 2006. The help text was probably overlooked.

Thanks for the help!

submitted bug report GNU Octave - Bugs: bug #60032, [octave forge] (matgeom)... [Savannah]