See other catalogues for
The MathWorks
You may also be interested in
Text version of the page
| | | | | | | | | |
| | | |
| | | Nested Functions | | |
| | | |
| | | [filt1, state1] = makeFilter([1 0], [1 -.5]); % First input to the filter is 1. filt1(1) ans = 1 % Second input to the filter is 0. filt1(0) ans = 0.5000 filt1(0) ans = 0.2500 % Show the filter's internal state. state1() ans = 0.2500 0.1250 % Hit the filter with another impulse. filt1(1) ans = 1.1250 % How did the state change? state1() ans = 1.1250 0.5625 % Make an averaging filter. filt2 = makeFilter([1 1 1]/3, [1 0 0]); % Put a step input into filt2. filt2(1) ans = 0.3333 filt2(1) | | |
| | | |
| | | 5-31 | | |
| | | |
| | | | | | | | | |