×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

how to load values for a vector field?

how to load values for a vector field?

how to load values for a vector field?

(OP)
The examples I see for vector fields go somewhat like this...

[x,y] = meshgrid(-10:1:10,-10:1:10);
M = x;
N = -y;
quiver(x,y,M,N)

I don't want to use a function to fill in the values, but want to load point by point.

For example, if I want to manually load the first element, in this case the element at (-10,-10) with the values (3.2,-1.9), how would I do it?

RE: how to load values for a vector field?

josephp,

The vector field is drawn by 'quiver(x,y,U,V)'

x and y are the coords to draw the vector and U and V are the values for the vector.

So to do what you stated above make 4 matrices that have the same dimensions one for each x,y,U,V.

and then pass them to quiver to get your vector field plot.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources