×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# how to plot phasors

## how to plot phasors

(OP)
I am just looking for a routine to plot a group of electrcal phasors like:
polar representation
1.00          1.00          1.00
-30.00       -150.00         90.00

or

equivalent rectangular representation
0.8660 - 0.5000i
-0.8660 - 0.5000i
0.0000 + 1.0000i

### RE: how to plot phasors

Have you looked into the compass command?

#### CODE

A = [0.866-0.5*i, 0.866+0.5*i, 0.000+1,0*i]'
compass(A)

//signed//
Christopher K. Hubley
Mechanical Engineer
Sunpower Incorporated
Athens, Ohio

(OP)

### RE: how to plot phasors

The compass function produces the same output as Phasor.m, no?

//signed//
Christopher K. Hubley
Mechanical Engineer
Sunpower Incorporated
Athens, Ohio

(OP)

### RE: how to plot phasors

Strange... seems to work for me. Did you check you inputs to the compass function against what it's expecting? Mind you, I'm using Octave rather than Matlab, so perhaps there's a Matlab bug that I'm unaware of. Here's my test code, and I've attached the resulting plot:

#### CODE

clear; clc; close all;
A = [0.8660 - 0.5000*i;  -0.8660 - 0.5000*i;  0.0000 + 1.0000*i];
B = [  1,    1,  1];
C = [-30, -150, 90];

h = figure(1);
subplot(2,2,1);
compass(A);
title('Compass Function Plotting Rectangular Representation');

subplot(2,2,2);
Phasor(A);
title('Phasor Function Plotting Rectangular Representation');

subplot(2,2,3);
U = B.*cos(C.*pi/180);
V = B.*sin(C.*pi/180);
compass(U,V);
title('Compass Function Plotting Polar Representation');

subplot(2,2,4);
Phasor([B;C]');
title('Phasor Function Plotting Polar Representation');

W = 5; H = 4;
set(h,'PaperUnits','inches')
set(h,'PaperOrientation','portrait');
set(h,'PaperSize',[H,W])
set(h,'PaperPosition',[0,0,W,H])
FS = findall(h,'-property','FontSize');
set(FS,'FontSize',6);
print(h,'-dpng','Phasor-v-compass.png')

//signed//
Christopher K. Hubley
Mechanical Engineer
Sunpower Incorporated
Athens, Ohio

### RE: how to plot phasors

(OP)
flash3780,
I make mistake.you´re all right.
I am not expert in matlab.

### RE: how to plot phasors

No worries, I hope that I was able to help. Check out my blog post for some tips to help produce professional plots with Matlab/Octave.

//signed//
Christopher K. Hubley
Mechanical Engineer
Sunpower Incorporated
Athens, Ohio
--
http://engineeringliberty.wordpress.com

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!