clc;
clear all;
n=-5:1:15; % Define n Range
figure;
x1=3*(n==-2) + (2*(n==0)) - (n==3) + 5*(n==7); % First Plot
stem(n,x1);
title('Figure 1 Impulse Plot Vs Time');
xlabel('Time');
ylabel('Amplitude');
grid on;
%--------------------------------------------------------------------------
figure;
n=-1:1:30; % Define n Range
x2=(10*(n>=0)) - 5*(n>=5) - 10*(n>10) + 5*(n>=15); %
Second Plot
stem(n,x2);
title('Figure 2 Step Functions Plot Vs Time');
xlabel('Time');
ylabel('Amplitude');
grid on;
%--------------------------------------------------------------------------
n=0:24;
x3=(-2*(mod(n,5)==0)) - 1*(mod(n,5)==1) - 0*(mod(n,5)==2) +
1*(mod(n,5)==3) + 2*(mod(n,5)==4); % Second Plot
n=-12:1:12;
figure;
stem(n,x3);
title('Figure 3 Plot Vs Time');
grid on;
xlabel('Time');
ylabel('Amplitude');
%--------------------------------------------------------------------------
x_val_1=zeros(10,1);
x_val=[2;4;-3;1;-5;4;7];
x_val=[x_val_1;x_val;x_val_1];
x_rev=x_val(numel(x_val):-1:1); % Time Reversal
x4=circshift(x_val,-3,1).*circshift(x_val,2,1)
+circshift(x_rev,1,1) .* circshift(x_rev,1,1) ;
figure;
n=-13:1:13;
stem(n,x4);
title('Figure 4 Plot Vs Time');
grid on;
xlabel('Time');
ylabel('Amplitude');
%--------------------------------------------------------------------------
x_val_1=zeros(9,1);
x_val=[0:9]';
x_n=[x_val_1;x_val];
x_n_rev=x_n(numel(x_n):-1:1); % Time Reversal
x_even=[x_n+x_n_rev]./2;
x_odd=[x_n-x_n_rev]./2;
n=-9:1:9;
figure;
stem(n,x_even);
title('Figure 5 Even Signal Plot Vs Time');
grid on;
xlabel('Time');
ylabel('Even Signal');
figure;
stem(n,x_odd);
title('Figure 6 Odd Signal Plot Vs Time');
grid on;
xlabel('Time');
ylabel('Odd Signal');
Using the basic developed MATLAB signal functions, generate the following sequences and then plot the signal...
solve using MatLab please. HW - 1 Use a cover page Word file attached for the homework solution. Solve all questions using Word and the Matlab output should be copied into the Word file. All questions and answers should be numbered HW1.1 Generate the following sequences using the basic MATLAB signal functions and the basic MATLAB signal operations discussed in this chapter. Plot signal samples using the stem function. 1- x(n) = n°[u(n+5] – u(n-6) + 105(n) + 20(0.5)* [u(n-4)...
Please answer all the questions Here is evenodd function: function [xe, xo, m] = evenodd(x,n) % Real signal decomposition into even and odd parts % ------------------------------------------------- % [xe, xo, m] = evenodd(x,n) % if any(imag(x) ~= 0) error('x is not a real sequence') end m = -fliplr(n); m1 = min([m,n]); m2 = max([m,n]); m = m1:m2; nm = n(1)-m(1); n1 = 1:length(n); x1 = zeros(1,length(m)); x1(n1+nm) = x; x = x1; xe = 0.5*(x + fliplr(x)); xo = 0.5*(x -...
General Guidelines MATLAB Symbolic Computations are NOT allowed for this assignment. Generate ALL plots using MATLAB. Include your MATLAB codes as an appendix at the end of your document. All plots should be clearly labeled: provide a X-axes and y-axes labels, specify units as needed, add titles and legend as needed, add grids as needed, use different line stiles and/or symbols as needed. 6) Consider the CT signal X(t) = u(t)- r(t) +r(t-1), where r(t) = t.u(t). a) Derive the...
Its related to MATLAB Generate a continuous-time signal z(t)-cos(2π 10t + 5) + cos(2π30t + 5). You may use the part of the followings. a >>t0:0.001:1; >plot (t, x_t) b. Generate a discrete-time signal x[n] = (1/4)(u[n]-u[n-4). You may use the part of the followings >>a_n-ones (1, 4) s> b_nzeros (1, 7) >> stem(n, x n) Generate a continuous-time signal z(t)-cos(2π 10t + 5) + cos(2π30t + 5). You may use the part of the followings. a >>t0:0.001:1; >plot (t,...
Now use MATLAB to generate and plot 15seconds of this signal in the time-domain.Use the fft() function to find the fourier transform of this signal and plot its magnitude spectrum School of Engineering Task 3 - The Fourier Transform: Scaling property Exercise: Let's take a look now at using the Fourier transform on aperiodic signals. Consider the real exponential signal from the discharging capacitor in tas 3 of laboratory 1 which was found to be: You(t)=e"u(t) Begin by calculating manually...
Please can you solve it using MATLAB. (1) Generate random signals [n] and hn, each of length N, and measure the time it takes to compute the linear convolution of r[n using the linear convolution definition and using the FFT method . Plot a graph of the results for N 104 to 10 in steps of 10. (2) Consider the signal x[n]-cos(0.3n),。£11S 100. Generate a plot of: ·The magnitude and phase of the DTFT of x[n] for 0 2π The...
Implement the following problems in MATLAB and document your work using the report guidelines on the next page. 1. Use the subplot function to place the relevant graphical results in a single figure. Generate a sequence of 1000 pairs of independent zero-mean Gaussian random variables, where X has variance 2 and N has variance 1, Let Y = X + N be the equation for a noisy signal. Plot X, N, and Y in a 3D scatter plot using Y...
using matlab Perform the following using Matlab For an additive Gaussian noise: a. Generate 4000 samples with mean value of 3 and variance of 9. b. Plot the sample values using two different ways. c. Determine the actual mean, variance, and standard deviation. d. Determine the median, mode, and range. e. Sketch the histogram. tle- enerate and plot the probability density function (pdf) and its corresponding cumulative distribution function (cdf) ror he M For the following two signals: / and...
please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab: x[n] = u(n) - u[n-6] a. Mathematically compute yi[n] = x[n] * x[n] where * means convolution. Now use the conv command to perform the convolution. Graph x[n) and the resulting y(n), both over the interval Osns 20. How many non-zero terms does y(n) have? Does your computational result agree with the Matlab result? b. Repeat a. but this time with yz[n] = x[n]*h[n)...
Please provide MATLAB code and plot, about system response. Will thumbs up. Thanks. Question 1: MATLAB contains a built-in function called conv which performs the convolution of two vectors: >> help conv conv Convolution and polynomial multiplication. C - conv(A, B) convolves vectors A and B. The resulting vector is length MAX ([LENGTH (A)+LENGTH (B)-1, LENGTH(A),LENGTH (B) 1) If A and B are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials. Compute the system response...