About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconbarbs (Scripts) Publisher's description

Plots vector fields and vector time series

Plots vector fields and vector time series

Plots barbs or arrows conserving angles and can place a scaling bar.The positions of the components u and v can be entered as matrices or vectors as with quiver.m The x axes can be labels of datestr.m A scaling factor (dar) is used between the x axes and y axes to conserve the angles and another scaling factor (ra) is used for the length of the barbs ir arrows.


% u,v = Vector Componentes
% t,p = Positions of the vectors u,v
% t is usually a time series but can also be x coordinates
% p is usually vertical coordinates
% ft = datestr.m format for labeling the the x axes
% dar = Scaling factor between x and y axes
% This is set as the second element of the property 'DataAspectRatio'
% ra = Length scaling factor for the barbs or arrows
% s = Type of line or 'LineStyle'
% lim = Limits for the axes in the form [xmin,xmax] or
% [xmin,xmax,ymin,ymax]
% rv = Magnitude of the scaling bar
% units = Units of the barbs as a string
% dx,dy = Normalized position of the scaling bar
% L = Vector of handles of the lines, L(end) is the handle of the
% scaling bar if it exist
% The default values change depending on the input format
% t = 1:length(u), dar = 1, ra = 1, s = 'b', ft=6, y p=0:10:10*size(u,2)
% rv y units are omitded if values are not given
% Number of | Posible
% Arguments | Formats
% <2 | Runs the barbs demo
% 2 | (u,v)
% 3 | (u,v,dar)
% 4 | (u,v,t,p), (u,v,t,ft), (u,v,dar,ra)
% 5 | (u,v,t,p,ft), (u,v,t,ft,dar), (u,v,t,ft,s), (u,v,dar,ra,s)
% 6 | (u,v,t,p,ft,dar), (u,v,t,ft,dar,ra), (u,v,t,ft,dar,s), (u,v,dar,ra,s,lim)
% 7 | (u,v,t,p,ft,dar,ra), (u,v,t,ft,dar,ra,s), (u,v,t,ft,dar,ra,rv)
% | (u,v,t,ft,dar,ra,lim)
% 8 | (u,v,t,p,ft,dar,ra,s), (u,v,t,ft,dar,ra,s,lim), (u,v,dar,ra,s,lim,rv,units)
% | (u,v,t,ft,dar,ra,rv,units)
% 9 | (u,v,t,p,ft,dar,ra,s,lim), (u,v,t,ft,dar,ra,s,lim,rv)
% 10 | (u,v,t,p,ft,dar,ra,s,lim,rv), (u,v,t,ft,dar,ra,s,lim,rv,units)
% | (u,v,dar,ra,s,lim,rv,units,dx,dy)
% 11 | (u,v,t,p,ft,dar,ra,s,lim,rv,units),
% 12 | (u,v,t,ft,dar,ra,s,lim,rv,units,dx,dy)
% 13 | (u,v,t,p,ft,dar,ra,s,lim,rv,units,dx,dy)

If u and v are vectors, it does not matter if they are column vectors or row vectors.If u, v, t and p are matrices, the variables should be used as if using quiver.m.If u and v are matrices and t and p are vectors, u and v are separated in length(t) rows amd length(p) columns.

For example if t and p are set as:

t=-2:.2:2; p=-1:.15:1;
this is equivalent to using:
[t,p] = meshgrid(t,p);

but u and v must correspond in dimensions to t and p as if using quiver.m (see Examples 5 and 6 in demo). If datestr.m labels are not wanted ft can be set as []. If any marker is used for the 'LineStyle', arrows are drawn instead of barbs (lines). At the end of the program is a demo which can be reviewed for further details. The demo is run by executing the program with <2 input variables.

The section where the input variables are read could be made more efficient by using a switch for every number of arguments and then using if's to determine the proper format but I'm to lazy to change it because the program works fine the way it is. If someone is up to it be my guest. The only reason I opted to use try's is because it was faster for me to program because in a sense I programed all formats at once.

Oh, and sorry the comments are in spanish...

Copy-Left, Alejandro SГЎnchez-Barba, 2005

System Requirements:

MATLAB 7 (R14)
Program Release Status: New Release
Program Install Support: Install and Uninstall

barbs (Scripts) Tags:

Click on a tag to find related softwares

Is barbs (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.