coef

From DavinciWiki
Jump to: navigation, search

Description

Coefficient (value without power of 10).

Arguments and Return Values

Arguments: A numeric array (any format)

Return Value: A numeric array (format float, or double for double input) containing the coefficient of the input

If no arguments are input, coef() prints its description, as shown below.

Usage

Syntax: coef(x)

'x' - a numeric array (any format)

coef(x)*10.^mag(x) == x

Examples

dv> coef()

Coefficient (value without power of 10) of input
coef(x) = x/10.^mag(x)
coef(2007) returns 2.007
Works for arrays
S.Marshall 12-07-2007

0
dv> coef(2007)
2.00700
dv> coef(1.9891e30//5.9736e24//6.4185e23)
3x1x1 array of float, bsq format [12 bytes]
1.98910 5.97360 6.41850
dv> coef(0.1//2.0//30.//400.)
4x1x1 array of float, bsq format [16 bytes]
1.00000 2.00000 3.00000 4.00000

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 12-08-2007
Modified On: 01-17-2008

Personal tools