簡單混合衰落信道
This mfile inputs an unmodulated sinewave through a simple Rayleigh two path fading channel and shows the output with phase, gain, and attenuation characteristics via animation.
The two C source files in this archive are specific to the TRS-80 Model 4 with
high-resolution graphics board. However, the code which performs Huffman enco-
ding and decoding is of general interest.
The two C source files in this archive are specific to the TRS-80 Model 4 with
high-resolution graphics board. However, the code which performs Huffman enco-
ding and decoding is of general interest.
These routines transmit and receive serial data using two general
* I/O pins, in 8 bit, No parity, 1 stop bit format. They are useful
* for performing serial I/O on 8051 derivatives not having an
* internal UART, or for implementing a second serial channel.
MFC Black Book
Introduction:
Are you an MFC programmer? Good. There are two types of MFC programmers. What kind are you? The first kind are the good programmers who write programs that conform to the way MFC wants you to do things. The second bunch are wild-eyed anarchists who insist on getting things done their way. Me, I’m in the second group. If you are in the same boat (or would like to be) this book is for you.
This book won’t teach you MFC—not in the traditional sense. You should pick it up with a good understanding of basic MFC programming and a desire to do things differently. This isn’t a Scribble tutorial (although I will review some fundamentals in the first chapter). You will learn how to wring every drop from your MFC programs. You’ll discover how to use, abuse, and abandon the document/view architecture. If you’ve ever wanted custom archives, you’ll find that, too.
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.
Sample Input
2
5
Sample Output
2^? mod 2 = 1
2^4 mod 5 = 1
Routine mampres: To obtain amplitude response from h(exp(jw)).
input parameters:
h :n dimensioned complex array. the frequency response is stored
in h(0) to h(n-1).
n :the dimension of h and amp.
fs :sampling frequency (Hz).
iamp:If iamp=0: The Amplitude Res. amp(k)=abs(h(k))
If iamp=1: The Amplitude Res. amp(k)=20.*alog10(abs(h(k))).
output parameters:
amp :n dimensioned real array. the amplitude-frequency response is
stored in amp(0) to amp(n-1).
Note:
this program will generate a data file "filename.dat" .
in chapter 2