순수한 공상과학연구소

pow( value1, value2 ) 함수에 대해 알아보자, 


아두이노에서 쓰이는(다른데서도 쓰는 지는 모르겠다.) pow 함수는 지수 계산을 표현한다. 


아두이노 library 을 보면. 

pow(base, exponent)

 

Description

Calculates the value of a number raised to a power. Pow() can be used to raise a number to a fractional power. This is useful for generating exponential mapping of values or curves.

Parameters

base: the number (float)

exponent: the power to which the base is raised (float)

Returns

The result of the exponentiation (double)

Example

See the fscale function in the code library.

See also

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

http://arduino.cc/en/Reference/pow


아두이노 libary에서 나타난 것처럼 exponential 라는 말이 있다. power을 측정하는데에 exponential 모양 이 많이 나타나서 이름이 pow 라고 쓰는 건지는 잘 모르겠으나....


쓰는 방법은 


Result = pow(base , exponent) 이다. 


이말은 수학적으로 Result = base^(exponent) 이다. 


base가 아래 지수 수이고, exponent가 지수 숫자가 되겠다. 


예를 들어 


cm = pow(3027.4 / lectura, 1.2134); 이면 


수학적으로 




이다. 끝





'Hardware Info. > Arduino' 카테고리의 다른 글

2015.6.8 Gyro Sensor 테스트  (0) 2015.06.08
2015.6.8 DHT11 온도 습도 센서  (0) 2015.06.08
Switch Button component principle  (0) 2015.01.26
작동 동영상(play video)  (0) 2015.01.26
케이스 디자인(Case Design)  (0) 2015.01.26