Code covered by the BSD License  

Highlights from
vfield_color

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 3.16 KB File ID: #23352
image thumbnail

vfield_color

by DS

 

18 Mar 2009

Plot a 2-D vector field, where color is defined by a colormap and indicates vector magnitude.

| Watch this File

File Information
Description

The function VFIELD_COLOR plots 2-D velocity vectors with colors defined by a colormap.

   Syntax:
      VFIELD_COLOR(X,Y,U,V,SCALE,CMAP)

   Inputs:
      X, Y Arrows origin, N-D arrays
      U, V Current components, N-D arrays
      SCALE Scalar value to set vector lengths
      CMAP Colormap, N x 3 array of RGB values

   Example:
             image = zeros(100);
             x = (rand(1,50) .* 80) + 10;
             y = (rand(1,50) .* 80) + 10;
             u = rand(1,50) .* 100;
             v = rand(1,50) .* 100;
             cmap = jet(64);
             scale = 10;
             vfield_color(image,x,y,u,v,scale,cmap)

 See also QUIVER, FEATHER, VFIELD

** The current implementation doesn't return handles to the graphics objects created by vfield.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
vfield

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
vfield DS 19 Mar 2009 13:39:53
velocity DS 19 Mar 2009 13:39:53
plot DS 19 Mar 2009 13:39:53
quiver DS 19 Mar 2009 13:39:53
vector DS 19 Mar 2009 13:39:53

Contact us at files@mathworks.com