Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Plot arrow

Subject: Plot arrow

From: Filoche

Date: 13 Dec, 2010 19:26:07

Message: 1 of 3

Hi everyone.

First of all, sorry if my question is obvious, but I can't find the right way to do it.

I have water current velocity (m/s) and the direction (degree) measured at x and y position.

I would like to plot a vector field of those data. I looked at the quiver function but I need to decompose my velocity and water direction into u and v components (that's where I have problem).

So my question is, how can I decompose the water direction and velocity into u,v so I can use quiver function.

Also, maybe there's a better function in replacement of "quiver".

With regards,
Phil

Subject: Plot arrow

From: Sean de

Date: 13 Dec, 2010 20:08:08

Message: 2 of 3

Filoche <pmassicotte@hotmail.com> wrote in message <1788637811.44039.1292268397327.JavaMail.root@gallium.mathforum.org>...
> Hi everyone.
>
> First of all, sorry if my question is obvious, but I can't find the right way to do it.
>
> I have water current velocity (m/s) and the direction (degree) measured at x and y position.
>
> I would like to plot a vector field of those data. I looked at the quiver function but I need to decompose my velocity and water direction into u and v components (that's where I have problem).
>
> So my question is, how can I decompose the water direction and velocity into u,v so I can use quiver function.
>
> Also, maybe there's a better function in replacement of "quiver".
>
> With regards,
> Phil

Basic trigonometry?

u = cos(theta)*velocity
v = sin(theta)*velocity

Subject: Plot arrow

From: Filoche

Date: 13 Dec, 2010 20:41:04

Message: 3 of 3

Thank you sire.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us