Dead Band for Second order System Get link Facebook X Pinterest Email Other Apps December 06, 2024 clc;clear; close; n=-1; y=12; while n<8 n=n+1; y =[y 0.9*y(n+1)]; end disp(y); disp([-y(n+2) y(n+2)]) Get link Facebook X Pinterest Email Other Apps Comments
Computation of DFT Using Basic Equation of FFT and Power Spectrum Estimating using DFT December 06, 2024 Program: clc ; clear ; x = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ] ; N = 8 ; n = 0 : N - 1 ; x = clean ( fft ( x ) ) ; y = clean ( ifft ( x ) ) ; mag = abs ( x ) ; phase = atan ( x ) ; disp ( " fft value was " ,x ) ; disp ( " ifft value was " ,y ) ; subplot ( 1 , 3 , 1 ) ; plot2d3 ( n,x ) ; xlabel ( " n-value " ) ; ylabel ( " amplitude of x(n) " ) ; title ( " Input sequence " ) ; subplot ( 1 , 3 , 2 ) ; plot2d3 ( n,mag ) ; xlabel ( " n value " ) ; ylabel ( " Magnitude of x(n) " ) ; title ( " Magnitude plot " ) ; subplot ( 1 , 3 , 3 ) ; plot2d3 ( n,phase ) ; xlabel ( " n value " ) ; ylabel ( " Phase of x(n) " ) ; title ( " Phase plot " ) ; Output Read more
Compute Convolution for Longer Sequence December 06, 2024 clc ; clear ; close ; h1 = [ - 1 , 1 ] ; l1 = [ 1 , 2 , 3 , 4 , 4 , 3 , 2 , 1 ] ; h2 = [ 1 , 2 ] ; l2 = [ 1 , 2 , - 1 ] ; s3 = convol ( l2,h2 ) ; disp ( s3 ) ; length1 = length ( h1 ) ; length2 = length ( l1 ) ; total = length2 - length1; //h1=[h1 zeros(1,total)]; s2 = convol ( h1,l1 ) ; disp ( s2 ) ; Read more
Spectrum Analysis using DFT December 06, 2024 Program: clc ; clear ; close ; fs = 125 ; fm = 10 ; m = 2 ; t = 0.0001 : 1 / fs : m / fm; x = 3 * cos ( 2 * %pi * fm * t ) ; N = ( m * fs / fm ) for k = 1 : N X1 ( k ) = 0 ; for n = 1 : length ( x ) X1 ( k ) = X1 ( k ) + x ( n ) .* exp ( ( - %i ) * 2 * %pi * ( n - 1 ) * ( k - 1 ) / N ) end end subplot ( 1 , 2 , 1 ) ; plot2d3 ( t,x ) ; k = 0 : N - 1 ; f = k * fs / N; subplot ( 1 , 2 , 2 ) ; plot2d3 ( f, abs ( X1 ) ) ; Read more
Comments
Post a Comment