[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sph2cart added functionality
From: |
Ben Abbott |
Subject: |
Re: sph2cart added functionality |
Date: |
Tue, 25 May 2010 07:59:07 -0400 |
On May 24, 2010, at 9:23 PM, Rik wrote:
> 5/24/10
>
> I was doing some GPS calculations and I had occasion to switch between
> spherical and Cartesian coordinates. The interface for sph2cart is:
>
> [X, Y, Z] = sph2cart (THETA, PHI, R)
>
> However, I find it more convenient to think of triplets in one vector space
> being converted to triplets in another space. For this it would be easier
> if I could call sph2cart with matrix arguments and receive matrix return
> arguments.
>
> Is there any problem with adding the ability to call sph2cart on matrices
> with column 1 = THETA, column 2 = PHI, column 3 = R? This would add
> additional functionality beyond the MATLAB function of the same name, but
> wouldn't take away the ability to replace the Octave function one-for-one
> in MATLAB code.
>
> --Rik
I don't have a problem with the idea. For consistency, I assume you'd modify
cart2sph, cart2pol, & pol2cart to behave similarly?
Ben