Lab problems

advertisement
1) Write a program that performing the following steps
a) Opens two files signal.txt, kernel.txt reads it into arrays signal and kernel type
double;
double signal[80];
double kernel[9];
double output[88];
b) Calculate convolution of signal and kernel arrays and store the result in an
output array.
c) Create a file output.txt and write the content of the output array to this file.
Files signal.txt and kernel.txt are given.
 signal.txt contains numbers that represent amplitudes values of a noisy
sinusoid (see figure below).
 kernel.txt contains numbers that represent a smoothing kernel (see figure
below).
After convolving signal and kernel you will get a smoothed sinusoid (see figure
below).
Singal.txt
Kernel.txt
Output.txt
Download