Learn R Programming

intrinsicDimension (version 1.2.0)

twinPeaks: Twin Peaks

Description

Generates data points from a two- or higher-dimensional Twin Peaks manifold.

Usage

twinPeaks(Ns, h = 1)
hyperTwinPeaks(Ns, n, h = 1)

Arguments

Ns

number of data points.

n

dimension of the (hyper) plane from which the peaks stand out. For twinPeaks n is 2.

h

height of the peaks.

Value

A n+1-dimensional data set, where the last dimension represents the height of the points.

Details

The height of the points is computed as \(\prod_1^n \sin(x_i)\), where \(x_1,...,x_n\) are the coordinates of the point in the (hyper) plane.

Examples

Run this code
# NOT RUN {
datap <- twinPeaks(400)
par(mfrow = c(1, 3))
plot(datap[,1], datap[,3])
plot(datap[,2], datap[,3])
plot(datap[,1], datap[,2])
# }

Run the code above in your browser using DataLab