Plotting vectors with arrow head - pvec
版本 7.0 (34.5 KB) 作者:
Matevz Lavtar
This function allows you to easily plot a vector with an arrow. You also can change the color, style, thickness of it.
The function pvec makes a vector with arrow head.
With x and y you determine origin of the vector.
With r you determine the lenght of the vector.
With fi you determine the angle in degrees from x axis in positive direction.
Additionally you can add color, style, thickness and final position of vector line.
Default settings are:
color: 'blue'
linestyle: '-'
thickness: 1
endposition: 0
If you want to plot multiple vectors on the same plot, use command hold on/off after function.
To title the plot use command title under function. More options you can find in the figure under the Insert segment.
引用格式
Matevz Lavtar (2024). Plotting vectors with arrow head - pvec (https://www.mathworks.com/matlabcentral/fileexchange/82665-plotting-vectors-with-arrow-head-pvec), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
创建方式
R2020b
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
7.0 | updated |
|
|
6.0 | Plotting vectors even if they are not in origin. |
|
|
5.0 | phasor diagram description added |
|
|
4.0 | Legend issue fix |
|
|
3.0 | Corrected file |
|
|
2.0 | Now is possible to move vector in any point, rotated at any angle. |
|
|
1.0.2 | Power diagrams |
|
|
1.0.1 | / |
|
|
1.0.0 |
|