Info
This question is closed. Reopen it to edit or answer.
Trying to plot vectors and then rotate one
1 view (last 30 days)
Show older comments
I am trying to set up a phasor viewer, for my own use. I am not getting what I expected as far as the plots are concerned.
What I want is for example threephasev(10,45) should give two vectors, one from the origin to (10,0) and the other rotated by 45 degrees.
I might have issues with the ordering in the matrices.
Thank you, Mick
if true
function [ output_args ] = threephasev( A,theta )
%threephasev A (magnitude) theta (phase angle)
% Plots the phasor of a the phase source
% Michael Carey
% Student Deakin University
% 400100801
% mpc.tab4(nospam)@gmail.com
% 12/3/2013
a = [ 0 0 ; A 0 ];
quiver(a(1),a(3),a(2),a(4));
% a(1) % a(3) % a(2) % a(4)
R=[ cosd(theta),-sind(theta) ; sind(theta),cosd(theta)];
b = R*a; hold on quiver(b(1),b(3),b(2),b(4));
end
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!