Question

Question : Design the low and high pass filter for the signal, x(t) = 10 sin...

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

Is below answer right?

at ?High pass , 5row

shouldn't this change from sin(100*t) ? sin(1000*t)
x = 10*sin(10*t) + 1*sin(100*t); ?   x = 10*sin(10*t) + 1*sin(1000*t); ???

.....................................................................................................................................................

?Low pass

clc;

rng default

Fs=2000;
t=linspace(0,1,Fs);
x=10*sin(10*t)+sin(1000*t)%given signal
n=0.5*randn(size(t));%noise
x1=x+n;
fc=150;
Wn=(2/Fs)*fc;
b=fir1(20,Wn,'low',kaiser(21,3));
%fvtool(b,1,’Fs’,Fs)
y=filter(b,1,x1);

plot(t,x1,t,y)
xlim([0 0.1])
xlabel('Time (s) ')
ylabel('Amplitude')
legend('Original Signal','Filtered Data')

.................................................................................................................................................................

?High pass

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(100*t);
% Lets filter this ginal for high frequency compenent at 100rad /sec
% i have chosen a sampling frequency of 1000 samples/sec and cutoff
% frequency of 100 rad/sec This will allow 1000 rad/sec and
% eliminate 10 rad/sec
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');

Homework Answers

Answer #1

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
% frequency of 100 rad/sec This will allow 1000 rad/sec and
% eliminate 10 rad/sec


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');

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
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. Please show me MATLAB code. * I can't recognize cursive script....
MATLAB FIR filter design. The audio file, covering the frequency range of roughly 0 to 3000...
MATLAB FIR filter design. The audio file, covering the frequency range of roughly 0 to 3000 Hz, is very badly corrupted with high?level noise. Your problem is to design a digital filter that will sufficiently attenuate the noise so that the audio speech is intelligible. (sorry but chegg doesn't allow me to attach the wav file) Here is the design template: clear, clc % clear all variables %% Read in the noisy audio signal from the file 'CapnJ.wav' using audioread...
Generate a signal x(t) = sin(t) + sin(5t) + sin(25t). a. Design a low-pass ?lter to...
Generate a signal x(t) = sin(t) + sin(5t) + sin(25t). a. Design a low-pass ?lter to extract sin(t). You can try di?erent types of ?lters and compare their performances. b. Design a band-pass ?lter to extract sin(5t). You can try di?erent types of ?lters and compare their performances. c. Design a high-pass ?lter to extract sin(25t). You can try di?erent types of ?lters and compare their performances
MATLAB. Design your own low-pass shelving filter which can boost the low frequency of given music...
MATLAB. Design your own low-pass shelving filter which can boost the low frequency of given music signal. After designing filter, apply the filter to the original music signal and observe the result. Include following plots. A. Magnitude and phase plot of your filter. B. Magnitude plot of original signal C. Magnitude plot of filtered signal
Design and draw a simple electrical circuit (a combination of a low-pass and a high-pass filter...
Design and draw a simple electrical circuit (a combination of a low-pass and a high-pass filter circuits) that will act as a bandpass filter for frequencies between 0.1 and 100 rad/s. Generate the magnitude Bode plot on matlab!!! Please do the matlab! thank you!
Below are three different codes in Matlab, please copy those your matlab and answer the following...
Below are three different codes in Matlab, please copy those your matlab and answer the following questions: Thank you for your help!!!! 1.1 Baseband Signal a) Plot time versus baseband signal (m_sig). b) Plot freq versus baseband signal spectrum (M_fre). 1.2 Amplitude Modulation – Suppressed Carrier. a) Plot time versus the DSB-SC signal (s_dsb). b) Plot freq versus the DSB-SC signal spectrum (S_dsb). 1.3 Coherent Demodulation a) Plot freq versus the pre-filtered signal (S_dem). b) Plot freq versus the post-filtered...
SHOW IN MATLAB PLEASE Generate a signal x(t) = sin(t) + sin(5t) + sin(25t). Design a...
SHOW IN MATLAB PLEASE Generate a signal x(t) = sin(t) + sin(5t) + sin(25t). Design a low-pass filter to extract sin(t).
Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1...
Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes labels with title. Generate and plot the function x2(t) = sin (30pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes labels with title. Generate and plot the combination function x3(t) = x1(t)*x2(t) as above. Use proper axes labels with title. Generate and plot the sum of two cosine waves   v1(t) =...
The signal x(t)=sinc2(100t) is sampled with frequency fs=150sample/sec 1. Determine the spectral representation of the sampled...
The signal x(t)=sinc2(100t) is sampled with frequency fs=150sample/sec 1. Determine the spectral representation of the sampled signal (n=-3 to n=3). 2. Plot the spectral representation of the sampled signal and determine if the signal has aliasing. 3. Determine the minimum frequency of sampling (Nyquist sampling frequency) so that the signal can be reconstructed using an ideal low pass filter. Justify your answer.
A signal x(t)=2 sin⁡(62.8 t)*u(t) is sampled at a rate of 5 Hz, and then filtered...
A signal x(t)=2 sin⁡(62.8 t)*u(t) is sampled at a rate of 5 Hz, and then filtered by a low-pass filter with a cutoff frequency of 12 Hz. Determine and sketch the output of the filter.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT