[Thread Prev][Thread Next][Index]

Re: [ferret_users] Equal vector lengths

Hi Ryo,
   Thanks, your normalization technique is effective. Actually in the user's guide, v6.02, i came across this PPLUS command:

VECSET   modified by VECTOR unless /LENGTH_SAME given

So i thought that this could be used.

On Thu, Jun 25, 2009 at 12:45 AM, Ryo Furue <furue@xxxxxxxxxx> wrote:
| Is it possible to have vector lengths of equal magnitude i.e. to
| disregard the actual length of the vector while keeping the
| orientation intact? I am unable to use "length_same" in this way:
| vector/length_same/set u,v
| ppl vector.

I've never seen a "length_same" qualifier, which seems to inherit
the length setting from the previous VECTOR command.  (Correct me
if I'm wrong.)  So, it doesn't seem to be what you want.

You can do it by

 let mag = (u*u + v*v)^0.5
 let us = u/mag
 let vs = v/mag
 vector us,vs

The magnitude of the new vector (us,vs) defined this way
is one everywhere, except (us,vs) is undefined where
(u,v) == 0.


Samrat Rao

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement