Learn R Programming

phonTools (version 0.2-2.2)

phasor: Plot Phasors

Description

Plot phasors representing one or more complex-valued variables.

Usage

phasor (num, scaled = TRUE, add = FALSE, circle = FALSE, 
        xlim, ylim, ...)

Arguments

num

A complex-valued variable to be plotted as a phasor, or a vector of such variables.

scaled

If TRUE, phasor magnitudes are scaled to 1.

add

If TRUE, phasors are plotted on existing figure. If FALSE, a new plot is created.

circle

If TRUE and scaled is TRUE, the unit circle is drawn.

xlim

x-axis range.

ylim

y-axis range.

...

Additional arguments are passed to the internal call of 'plot' and 'arrows'.

Author

Santiago Barreda <sbarreda@ucdavis.edu>

Details

Complex-valued variables may be created using the complex() function.

Examples

Run this code

#noise = rnorm (100)
#phasors = fft(noise)

#par (mfrow = c(1,3))
#phasor (phasors)
#phasor (phasors, circle = TRUE)
#phasor (phasors, scaled = FALSE)

Run the code above in your browser using DataLab