behavior of sph2cart() doesn't match matlab (?)

michael tesch tesch1 at gmail.com
Thu Jan 15 19:57:33 CST 2009


GNU Octave, version 3.0.2, on macosx, from 'port'.

I can't actually verify this on the matlab side, but I got code that
was developed in matlab that did the following:

  for nsp=1:sz
    [TH,PHI]=cart2sph(xx,yy,zz);
    [X,Y,Z]=sph2cart(TH,PHI,A);
    spoke=[X ;Y ;Z];
  end

Where xx,yy,zz,TH,PHI were all scalars, and A was a 1xN vector.  The
result was that spoke was a matrix of 3xN.

the Octave implementation of sph2cart() dies with an error about
mismatched dimensions of parameters.


More information about the Bug-octave mailing list