function phasor(modulus, argument) % Wrapper for quiver() that plots phasor diagrams. % % Expects the modulus and argument (in degrees) % of a complex number. r = modulus; phi = argument * pi / 180; % Automatic scaling is disabled. quiver(0, 0, r*cos(phi), r*sin(phi), 0); xlim([-r r]); ylim([-r r]); end