[Thread Prev][Thread Next][Index]

Re: [ferret_users] Equal vector lengths



| 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.

Regards,
Ryo


[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement