TO FIND DFT & IDFT OF A GIVEN SIGNAL USING INBUILT MATLAB FUNCTION:
clc
clear all
close all
x=input('enter the sequence of x')
N=input('length of dft N=')
disp('N-point DFT')
X=fft(x)
n=0:1:length(X)-1
subplot(2,2,1)
stem(n,x)
xlabel('time')
ylabel('amplitude')
title('input sequence')
subplot(2,2,2)
stem(n,abs(X))
xlabel('frequency')
ylabel('amplitude')
title('magnitude spectrum of x[n]')
subplot(2,2,3)
stem(n,angle(X))
xlabel('frequency')
ylabel('phase')
title('phase spectrum of x[n]')
%inverse DFT
disp('N-point IDFT')
xr= ifft(X)
subplot(2,2,4)
stem(n,xr)
xlabel('time')
ylabel('amplitude')
title('IDFT')
THIS IS THE CODE FOR ANY SEQUENCE
if u wanna plot for triangular pulse
use syms
code:
syms x
fplot(triangularPulse(x,[-a a]))
SAMPLE INPUTS:
X = [ [2,3,-8,-6,4,1,-9]]
Xr= [2.000000000000000,3,-8,-6,4,1,-9]
N-point DFT
X =
Columns 1 through 5
-13.0000 + 0.0000i 1.6186 + 3.7312i 8.3949 -23.4224i 3.4864 - 2.4938i 3.4864 + 2.4938i
Columns 6 through 7
8.3949 +23.4224i 1.6186 - 3.7312i
Need help with coding in MATLAB for communication 1. Use DFT to find the magnitude and...
2: Consider the signal rn - rectv(n). Find DFT for N 12. Plot the DFT (magnitude spectrum and phase spectrum) using Matlab. Now, append the signal with zero padding. Recalculate your DFT and plot the DFT. Use your code to calculate IDFT in both cases.
I need help for Ex 1-5. Please include the Matlab Coding
involved for the problems that have to use Matlab
Use matlab
Need the matlab code
Problem 3: (a) Use Fourier transform to find i(t) in the circuit below if v.( 10e2tu(t). Use MATLAB to solve your problem. (b) Plot the magnitude and phase spectrum of the current I(o). 2Ω 3 20 1 H Submit the solution in word file. The used MATLAB code should be included Due date: last day of classes
Using MATLAB!!! Please and thank you
(5 points) Use Matlab to plot the magnitude and phase of as a function of ω over the interval 0 If the input is ω 2π (5 points) What is the FS representation of y[n]? (5 points) Plot x[n] and y[n] over the range 0 to 24. If either has an imaginary component you must plot both real and imaginary parts .You must hand in a published .pdf of your script that shows the...
Can someone please help me with all these
questions please? I desperately need it asap! Must be done with
MATLAB. Thumbs up will be guaranteed! Thank you so
much!!
A. Discrete Fourier Transform and zero padding For the signals x1[n] and x2[n] answer the following questions: x2 [n] = cos(2m30/100) + 0.5 cos(2nn40/100) 1) Compute and plot the length-N DFT magnitude of signals x1[n] and x2[n] with respect to frequency fr, where f and N is the number of samples....
Using Matlab, plot the magnitude and phase of the transfer
function (vo/vi) vs. frequency range 1-100 kHz. Use log scale for
the frequency axis, dB scale for the magnitude axis, and degrees
for the phase axis. Note dB = 20log10(vo/vi). The 10 stands for
base 10. I need help writing a MATLAB code to output this plot and
also coming up with the vo/vi function itself.
0.1807 H 1402 nF 0.1624 H 1.560nF 1.559 mH
1. Use the MATLAB command freqz to calculate the DTFT of System 1, to find its frequency response 0.25r[n] + 0.25r|n -2]. H(). For this exercise, System 1 has a different difference equation yn] Find H1 (w) for- aK π, with frequency steps of Δα-π/100. 2. Plot both the magnitude |H1(2)| and the phase LH1(w) vs w, for-π < ώ < π. Use abs and angle commands to obtain magnitude and phase. Label and title both plots and include in...
Matlab help
1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...
Question 4 (a) Find the DFT of the series x[n)-(0.2,1,1,0.2), and sketch the magnitude of the resulting spectral components [10 marks] (b) For a discrete impulse response, h[n], that is symmetric about the origin, the spectral coefficients of the signal, H(k), can be obtained by use of the DFT He- H(k)- H-(N-1)/2 Conversely, if the spectral coefficients, H(k), are known (and are even and symmetrical about k-0), the original signal, h[n], can be reconstituted using the inverse DFT 1 (N-D/2...
alpha = 5.0
beta = 7.1
zeta = 6.9
PROBLEM 1 (20 points). Given the filter with transfer function +28-1+-2 11(2) = 1-(α/10)2-4 (a2/100):-2 Use MATLAB to Find the zeros and poles of H() Plot the poles and zeros on the -plane. The pot should include the uit circle. Plot the magnitude response (in dB) Plot the phase response. Deliverables: Your MATLAB code used to solve Problem 1 and all the generated plots.
PROBLEM 1 (20 points). Given the filter...