phasor: Plot Phasors

Description Usage Arguments Details Author(s) Examples

View source: R/phasor.R

Description

Plot phasors representing one or more complex-valued variables.

Usage

1
2
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'.

Details

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

Author(s)

Santiago Barreda <[email protected]>

Examples

1
2
3
4
5
6
7
noise = rnorm (100)
phasors = fft(noise)

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

phonTools documentation built on May 29, 2017, 9 a.m.