Question

PROBLEM 7 Using the basic developed MATLAB signal funcions, generate the following sequences and then plot the signal samples using the stem function. (2) x2lnj 10uln 5uln -5l 10uu In-10l 5uln 15l PROBLEM 8 Generate the periodic sequence and plot the samples (using the stem function) of inl- 2.-1.0.1.2 over 5 periods. PROBLEM 9 Let xinl 12,4 -3,1 -5,4,71. Generate and plot the samples (using the stem function) of xlnl XIn +3lxIn- PROBLEM 10 Using the evenodd function, decompose the sequence xIn] l0,1,2,3,4,5,6, 7,8,9 into its even and odd com- ponents. Plot these components using the stem function
0 0
Add a comment Improve this question Transcribed image text
Answer #1

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

Figure 1 Impulse Plot Vs Time Time

Figure 2 Step Functions Plot Vs Time 10 20 25 30 Time

Figure 3 Plot Vs Time 1.5 0.5 0.5. 15 10 Time

Figure 4 Plot Vs Time 60 50 40 兰 30 . . . 20t 15 10 Time

Figure 5 Even Signal Plot Vs Time 4.5 4 3.5 2.5 2 0.5 0 2 8 Time

Figure 6 Odd Signal Plot Vs Time び) -3 8 6-2246810 Time

Add a comment
Know the answer?
Add Answer to:
Using the basic developed MATLAB signal functions, generate the following sequences and then plot the signal...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • solve using MatLab please. HW - 1 Use a cover page Word file attached for the...

    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) % R...

    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....

    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...

    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()...

    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...

    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 ...

    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...

  • Perform the following using Matlab For an additive Gaussian noise: a. Generate 4000 samples with ...

    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:...

    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-...

    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...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT