Colored 2D Vector Field Plotter

版本 1.0.0.0 (1.2 KB) 作者: Michael Sullivan
Plots 2D vectors colored according to their lengths.
1.8K 次下载
更新 2007/11/27

无许可证

COLORVFIELD Colored 2D Vector Field Plotter.

COLORVFIELD(X,Y,U,V) plots colored vectors with components (u,v) at the points (x,y). The vectors are colored using the jet color map (with the smallest vectors colored blue the largest colored red) and are divided into 32 discrete color levels.

COLORVFIELD(X,Y,U,V,NUMBER_COLOR_LEVELS) divides the color map into NUMBER_COLOR_LEVELS dicrete color levels.

Example:
X = linspace(-10,10,32);
Y = linspace(0, 0, 32);
U = linspace(-1,-5,32);
V=linspace(1,5,32);
colorvfield(X,Y,U,V,16); % plot 16 color levels
title('Vectors Plotted with Color Map (colorvfield.m)')
axis([-12.25,11.75,-0.25,4.75])
xlabel('X')
ylabel('Y')

引用格式

Michael Sullivan (2026). Colored 2D Vector Field Plotter (https://ww2.mathworks.cn/matlabcentral/fileexchange/17754-colored-2d-vector-field-plotter), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Vector Fields 的更多信息
版本 已发布 发行说明
1.0.0.0