You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
591 B
10 lines
591 B
|
|
Exercise 3.76: Eva Lu Ator has a criticism of
|
|
Louis’s approach in Exercise 3.75. The program he wrote is not modular,
|
|
because it intermixes the operation of smoothing with the zero-crossing
|
|
extraction. For example, the extractor should not have to be changed if Alyssa
|
|
finds a better way to condition her input signal. Help Louis by writing a
|
|
procedure smooth that takes a stream as input and produces a stream in
|
|
which each element is the average of two successive input stream elements.
|
|
Then use smooth as a component to implement the zero-crossing detector
|
|
in a more modular style.
|
|
|