chooseFitSection: Grafically choose a section of a graph.

Description Usage Arguments Details Value See Also Examples

View source: R/turb.R

Description

Plots a graph and prompts user to choose, by clicking points with the mouse, the most appropriate section.

Usage

1
chooseFitSection(x, y, v = NULL, h = NULL, ...)

Arguments

x

X coordinate of the points.

y

Y coordinate of the points.

v

Position where vertical lines, if any, should be plotted.

h

Position where horizontal lines, if any, should be plotted.

...

Other parameters to plot function, usually log='...' is used.

Details

After measuring a velocity profile, important parameters can be calculated from this profile. However, the behavior of a boundary layer changes along its width and to calculate those parameters (such as z0) the correct region of the boundary layer should be chosen. This function plots the velocity profile and prompts the user to select the interesting region.

Value

Range of the indices inside the chosen region.

See Also

identify

Examples

1
2
3
4
5
6
7
z <- seq(5, 300, by=5)
k <- 0.4
z0 <- 2
us <- 0.5
u <- 1/k * log(z/z0) + rnorm(10, sd=0.2)
idx <- chooseFitSection(u, z, log='xy')
lines(u[idx], z[idx], lwd=2, col='red')

tunelipt/wutils documentation built on Nov. 5, 2019, 11:01 a.m.