How to plot phasors of signals?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have 3 singals and I'm trying to plot their phasors and their sum. I need to plot them end to end to demonstrate phasor addition. That is, the first phasor must start from the origin. The second phasor must start from the end of the first phasor. The third phasor must start from the end of the second one. In this way, the end point of the third phasor is the resulting phasor (considering that it starts at the origin). Horizontal and vertical axes are the real and imaginary axes, respectively in range of [-30, 30].
I just started using matlab today and this is due the night. I tried using plot, plot2, plot3, compass, and several ways but with all of them i failed. Compass was the closest to success.
I have amplitude and phase values of each phasor.
So how can I accomplish this task? Can you help me to draw two of phasors?
Any help is appreciated.
Thank you!
Related Example: from http://fourier.eng.hmc.edu/e84/lectures/ch3/node2.html

matlab signal-processing
add a comment |Â
up vote
0
down vote
favorite
I have 3 singals and I'm trying to plot their phasors and their sum. I need to plot them end to end to demonstrate phasor addition. That is, the first phasor must start from the origin. The second phasor must start from the end of the first phasor. The third phasor must start from the end of the second one. In this way, the end point of the third phasor is the resulting phasor (considering that it starts at the origin). Horizontal and vertical axes are the real and imaginary axes, respectively in range of [-30, 30].
I just started using matlab today and this is due the night. I tried using plot, plot2, plot3, compass, and several ways but with all of them i failed. Compass was the closest to success.
I have amplitude and phase values of each phasor.
So how can I accomplish this task? Can you help me to draw two of phasors?
Any help is appreciated.
Thank you!
Related Example: from http://fourier.eng.hmc.edu/e84/lectures/ch3/node2.html

matlab signal-processing
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have 3 singals and I'm trying to plot their phasors and their sum. I need to plot them end to end to demonstrate phasor addition. That is, the first phasor must start from the origin. The second phasor must start from the end of the first phasor. The third phasor must start from the end of the second one. In this way, the end point of the third phasor is the resulting phasor (considering that it starts at the origin). Horizontal and vertical axes are the real and imaginary axes, respectively in range of [-30, 30].
I just started using matlab today and this is due the night. I tried using plot, plot2, plot3, compass, and several ways but with all of them i failed. Compass was the closest to success.
I have amplitude and phase values of each phasor.
So how can I accomplish this task? Can you help me to draw two of phasors?
Any help is appreciated.
Thank you!
Related Example: from http://fourier.eng.hmc.edu/e84/lectures/ch3/node2.html

matlab signal-processing
I have 3 singals and I'm trying to plot their phasors and their sum. I need to plot them end to end to demonstrate phasor addition. That is, the first phasor must start from the origin. The second phasor must start from the end of the first phasor. The third phasor must start from the end of the second one. In this way, the end point of the third phasor is the resulting phasor (considering that it starts at the origin). Horizontal and vertical axes are the real and imaginary axes, respectively in range of [-30, 30].
I just started using matlab today and this is due the night. I tried using plot, plot2, plot3, compass, and several ways but with all of them i failed. Compass was the closest to success.
I have amplitude and phase values of each phasor.
So how can I accomplish this task? Can you help me to draw two of phasors?
Any help is appreciated.
Thank you!
Related Example: from http://fourier.eng.hmc.edu/e84/lectures/ch3/node2.html

matlab signal-processing
matlab signal-processing
asked Feb 22 '15 at 12:06
mmswe
12118
12118
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
I've done that some times, and i used the compass function as well. What you trying to do takes some hacking in the plot.
clc; close all
a=3*exp(j0); b=4*exp(j30); c=a+b; vet=[a b c];
figure(1)
Vet=compass(vet)
The data is plotted with the arrow starting at the origin, (0,0), now you must:
- move the second arrow to the tip of the fist, or;
- copy the first and move to the tip of the second and copy the second and move to the tip of the first.
This is done getting the xdata/ydata of the respective vectors on the plot.
set(Vet(2),'xdata',get(Vet(2),'xdata')+real(vet(2)))
set(Vet(2),'ydata',get(Vet(2),'ydata')+imag(vet(2)))
The second option i'll let you think a little bit on how to implement -- it's not that dificult -- but once you do you will have to get the xdata/ydata to move around the plotted data.
The xdata and ydata have the information of all the points that are used to plot the data. So, get the xdata of the second vector, say x2, and make it x2+x1, xdata of second vector + xdata of first vector; the same with the ydata.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I've done that some times, and i used the compass function as well. What you trying to do takes some hacking in the plot.
clc; close all
a=3*exp(j0); b=4*exp(j30); c=a+b; vet=[a b c];
figure(1)
Vet=compass(vet)
The data is plotted with the arrow starting at the origin, (0,0), now you must:
- move the second arrow to the tip of the fist, or;
- copy the first and move to the tip of the second and copy the second and move to the tip of the first.
This is done getting the xdata/ydata of the respective vectors on the plot.
set(Vet(2),'xdata',get(Vet(2),'xdata')+real(vet(2)))
set(Vet(2),'ydata',get(Vet(2),'ydata')+imag(vet(2)))
The second option i'll let you think a little bit on how to implement -- it's not that dificult -- but once you do you will have to get the xdata/ydata to move around the plotted data.
The xdata and ydata have the information of all the points that are used to plot the data. So, get the xdata of the second vector, say x2, and make it x2+x1, xdata of second vector + xdata of first vector; the same with the ydata.
add a comment |Â
up vote
0
down vote
I've done that some times, and i used the compass function as well. What you trying to do takes some hacking in the plot.
clc; close all
a=3*exp(j0); b=4*exp(j30); c=a+b; vet=[a b c];
figure(1)
Vet=compass(vet)
The data is plotted with the arrow starting at the origin, (0,0), now you must:
- move the second arrow to the tip of the fist, or;
- copy the first and move to the tip of the second and copy the second and move to the tip of the first.
This is done getting the xdata/ydata of the respective vectors on the plot.
set(Vet(2),'xdata',get(Vet(2),'xdata')+real(vet(2)))
set(Vet(2),'ydata',get(Vet(2),'ydata')+imag(vet(2)))
The second option i'll let you think a little bit on how to implement -- it's not that dificult -- but once you do you will have to get the xdata/ydata to move around the plotted data.
The xdata and ydata have the information of all the points that are used to plot the data. So, get the xdata of the second vector, say x2, and make it x2+x1, xdata of second vector + xdata of first vector; the same with the ydata.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I've done that some times, and i used the compass function as well. What you trying to do takes some hacking in the plot.
clc; close all
a=3*exp(j0); b=4*exp(j30); c=a+b; vet=[a b c];
figure(1)
Vet=compass(vet)
The data is plotted with the arrow starting at the origin, (0,0), now you must:
- move the second arrow to the tip of the fist, or;
- copy the first and move to the tip of the second and copy the second and move to the tip of the first.
This is done getting the xdata/ydata of the respective vectors on the plot.
set(Vet(2),'xdata',get(Vet(2),'xdata')+real(vet(2)))
set(Vet(2),'ydata',get(Vet(2),'ydata')+imag(vet(2)))
The second option i'll let you think a little bit on how to implement -- it's not that dificult -- but once you do you will have to get the xdata/ydata to move around the plotted data.
The xdata and ydata have the information of all the points that are used to plot the data. So, get the xdata of the second vector, say x2, and make it x2+x1, xdata of second vector + xdata of first vector; the same with the ydata.
I've done that some times, and i used the compass function as well. What you trying to do takes some hacking in the plot.
clc; close all
a=3*exp(j0); b=4*exp(j30); c=a+b; vet=[a b c];
figure(1)
Vet=compass(vet)
The data is plotted with the arrow starting at the origin, (0,0), now you must:
- move the second arrow to the tip of the fist, or;
- copy the first and move to the tip of the second and copy the second and move to the tip of the first.
This is done getting the xdata/ydata of the respective vectors on the plot.
set(Vet(2),'xdata',get(Vet(2),'xdata')+real(vet(2)))
set(Vet(2),'ydata',get(Vet(2),'ydata')+imag(vet(2)))
The second option i'll let you think a little bit on how to implement -- it's not that dificult -- but once you do you will have to get the xdata/ydata to move around the plotted data.
The xdata and ydata have the information of all the points that are used to plot the data. So, get the xdata of the second vector, say x2, and make it x2+x1, xdata of second vector + xdata of first vector; the same with the ydata.
answered Apr 29 '15 at 21:53
ÃbanoRafael
1
1
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1160008%2fhow-to-plot-phasors-of-signals%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password