File Exchange

## polarG(start_comple​x,end_complex,arrow​_length,arrow_angle​,colour_code,line_w​idth)

version 6.0.0.0 (5.15 KB) by Scott Williams

### Scott Williams (view profile)

Vector Diagram Matlab Plot

Updated 01 Oct 2015

Draws two dimensional vectors on Matlab figures. Uses complex numbers. Example provided. Should be used in conjunction with 'export_fig' for high quality output. For each vector, start point, end point, arrow head length, arrow tip angle, colour, & line width are specified. If pol2rec(magnitude, angle) also downloaded, can take vector start/end point in polar form.
How it works: arrow head is 250 carefully placed lines at right angle to vector, finishing at end point of vector.

### Cite As

Scott Williams (2019). polarG(start_complex,end_complex,arrow_length,arrow_angle,colour_code,line_width) (https://www.mathworks.com/matlabcentral/fileexchange/53261-polarg-start_complex-end_complex-arrow_length-arrow_angle-colour_code-line_width), MATLAB Central File Exchange. Retrieved .

Movenko Eugene

### Movenko Eugene (view profile)

Scott Williams Sorry, I understood.

Movenko Eugene

### Movenko Eugene (view profile)

I have two questions:
1 - When I need to build a vector with coordinates 3 + j * 0, there is the construction coordinate with 3 + j * 3?
2 - How can use the polarG another m - file?
Thank you!

Scott Williams

### Scott Williams (view profile)

Movenko: Walter Robinson suggests: "They tried to put that line at the top of the file and then run the result. They need to store the file unchanged and type that line at the command prompt." Is that what happened?

Movenko Eugene

### Movenko Eugene (view profile)

Using the example: polarG (0 + 0j, 2 + 1 * j, .1,30, 'r', 1) I have ::
Error: File: polarG.m Line: 32 Column: 5
Function definitions are not permitted in this context.
What I have a problem?
Thank you!

Scott Williams

### Scott Williams (view profile)

help polarG
For 'help' file. Final lines displayed can be copied and pasted to command prompt for an implemented example.

Scott Williams

### Scott Williams (view profile)

Please note that if you would like to add a legend at the command line, add 'fake' plots outside the range in line colour/format required, then make these plots invisible using axis([xmin xmax ymin ymax]) command. Legend command will not work as desired after using this command because polarG works by drawing thousands of lines as the arrowhead.