math_nonlinear_vector: Generate non-linear vector

View source: R/math.R

math_nonlinear_vectorR Documentation

Generate non-linear vector

Description

Function returns a vector of length n. The first value of the returned vector is c_start and the last value is c_end. The calculation is done accordingly: c_{end}=c_{start}a^{n−1} => a=\frac{c_{end}}{c_{start}}^{\frac{1}{n-1}} so the returned vector will be calculated with: c_{start}\cdot a^{(0:(n-1))}

Usage

math_nonlinear_vector(c_start, c_end, n)

Arguments

c_start

value of first value of returned vector

c_end

value of last index of returned vector

n

length of returned vector

Value

vector of length n

Author(s)

Florian Wagner florian.wagner@wagnius.ch

Examples

math_nonlinear_vector(1000,100000,8)
math_nonlinear_vector(1000,100000,8)|>plot()

wagnius-GmbH/slvwagner documentation built on Jan. 19, 2025, 7:10 a.m.