Question

Design the "high pass filter" for the signal, x(t) = 10 sin (10 t) + 1...

Design the "high pass filter" for the signal, x(t) = 10 sin (10 t) + 1 sin (1000 t) by MATLAB

I have to submit MATLAB code which is written on A4 size paper.

* I can't recognize cursive script....

MATLAB code is given below.

clc;close all;clear all;
fs = 1000; % sampling frequency is 1000Hz

ts = 1/fs; % Sample time

t = 0:ts:1;

x = 10*sin(10*t) + 1*sin(1000*t);

% Lets filter this ginal for high frequency compenent at 100rad /sec
% i have chosen a sampling frequency of 1000 samples/sec and cutoff

fc = 100/(2*pi); % Cutoff frequency of Highpass Filter

order = 5;

[b,a] = butter(order,fc/(fs/2),'high'); % Butter worth filter of order 5

y = filter(b,a,x) ; % Filter the signal

figure;plot(t,x,t,y);grid;title('Input and filtered signals');
% Plot the input and filtered signals

legend('x(t)','Filtered signal');

xlabel('Time');ylabel('Amplitude');

Earn Coins

Coins can be redeemed for fabulous gifts.