comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: vectors with same length
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: vectors with same length [message #61766] Mon, 28 July 2008 14:44 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<e8c1f958-1621-4dba-9f10-ebba593e2de9@d1g2000hsg.googlegroups.com>,
knielsen73@gmail.com wrote:

> Hi,
>
> I am using velovect to create a vector plot. I would like for all the
> vectors to have the same length instead of the length representing
> amplitude. Is there are quick way to do this using velovect, or do I
> have to modify velovect?
>
> Thanks,
> Kim

Just divide each vector by it's magnitude. Given vector components u and v

mag = SQRT(u^2 + v^2)

VELOVECT, u/mag, v/mag

Watch out for zeroes, though.

Ken Bowman
[Message index]
 
Read Message
Read Message
Previous Topic: vectors with same length
Next Topic: Finding the Top Two Most Common Coordinates in a Multi-Dimensional Array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 15:26:00 PDT 2025

Total time taken to generate the page: 1.11982 seconds