This example program shows how to configure and use the A/D Converter of the following microcontroller:
STMicroelectronics ST10F166
After configuring the A/D, the program reads the A/D result and outputs the converted value using the serial port.
To run this program...
Build the project (Project ...
The module LSQ is for unconstrained linear least-squares fitting. It is
based upon Applied Statistics algorithm AS 274 (see comments at the start
of the module). A planar-rotation algorithm is used to update the QR-
factorization. This makes it suitable for updating regressions as more
data become a ...
he LPC932 can be used to create a Pulse Width Modulated PWM signal. That s an analog signal, with only 2 discrete levels, for example 0V and 5V and a constant period. The current value of this signal at a certain poiTnt of time is proportional to its Duty Cycle. That s the High Time during one perio ...
数字运算,判断一个数是否接近素数
A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum o ...
2^x mod n = 1 acm竞赛题 Give a number n, find the minimum x that satisfies 2^x mod n = 1.
Input
One positive integer on each line, the value of n.
Output
If the minimum x exists, print a line with 2^x mod n = 1.
Print 2^? mod n = 1 otherwise.
You should replace x and n with specific numbers. ...
This a simple genetic algorithm implementation where the
evaluation function takes positive values only and the
fitness of an individual is the same as the value of the
objective function