Question

In: Electrical Engineering

In this exercise, you will be given a system with their input/output relationships. Using MATLAB, determine...

In this exercise, you will be given a system with their input/output relationships. Using MATLAB, determine whether the system below are a) linear/non-linear b) time-invariant/timevariant, c) causal/noncausal, d) has memory/memoryless:

y[n] = x2[n]

Provide MATLAB code and graphs to show your work for the linearity and time-invariance testing

Solutions

Expert Solution

MATLAB code is given below

clc;
close all;
clear all;

% Let the input be a ramp sequence
n = 0:1:50;
x = n; % Input is unit ramp sequence

figure;stem(n,x,'fill');grid on;
xlabel('n');ylabel('Stem Height');title('Input Sequence');

% Linearity test question (a)
y = x.^2;
figure;stem(n,y,'fill');grid on;
xlabel('n');ylabel('Stem Height');title('Output Sequence');

It is observed from the above figure that, the rseponse y[n] for unit ramp is parabolic. Hence input output relation is not proportional. Therefore the system is non-linear.

% Time invariance test question (b)
% A Time invariant system output does not depend on when the input is
% applied
n_shift = 50:100; % Shift in time
figure;stem(n_shift,y,'fill');grid on;
xlabel('n');ylabel('Stem Height');title('Output Sequence when the input is applied at n = 50');

It is observed from the above figure that, input at n = 50 has caused the output at n = 50. Therefore the systems outout does not depend on when the input is appled. Hence the system is Time-Invariant.

% Test on causality
% A system is causal when the its unit sample response is zero for n<0
% the systems output when the input is unit sample is given below
x = 1*(n == 0); % unit sample
h = x.^2; % unit sample response
figure;stem(n,h,'fill');grid on;
xlabel('n');ylabel('Stem Height');title('Unit sample response');

It is observed from the above figure that, the system's output is zero for n<0 which indicates that system is causal.

% Question (d)

From the above figure it is observed that h[n] = 0 for n>0 which indicate that the system is memoryless system.


Related Solutions

In this Exercise, you have to take a single string as input. Using this input string,...
In this Exercise, you have to take a single string as input. Using this input string, you have to create multiple queues in which each queue will comprise of separate word appeared in input string. At the end, you will again concatenate all queues to a single queue.s Example: String = “Data Structure and Algo” Q1 = D → a → t → a Q2 = S → t → r → u → c → t → u →...
write a Matlab function file to solve system Ax=b by using the output of the function...
write a Matlab function file to solve system Ax=b by using the output of the function lufac2a your function should have inputs f=matrix return from lufac2a, piv=array return by lufac2a and b=right hand side of your system.the only output for your system should be x guideline 1.use the column access for the matrix entries 2. do not create any other matrix in your function-get your data directly from the matrix passed into your function 3.do not use Matlab command designed...
MATLAB; How to find LowerCaseCount, UpperCaseCount, NumericCount, OtherCount. Using the input file of characters, determine %...
MATLAB; How to find LowerCaseCount, UpperCaseCount, NumericCount, OtherCount. Using the input file of characters, determine % the number of characters that meet the following criterion. Each output % variable will be a 1 x 1 scalar (i.e. how many of each there are). % Input: 'Matlab_Wikipedia.mat' (variable name is Contents) % Output: LowerCaseCount, UpperCaseCount, NumericCount, OtherCount
The input-output (consumption) matrix for a closed economy is given below. Solve the associated input- output...
The input-output (consumption) matrix for a closed economy is given below. Solve the associated input- output model. Use r if you need a variable in your answer. [0.07 0.05 0.27] [0.17 0.48 0.19] [0.76 0.47 0.54]
x[n] is the input of a system and y[n] is the output of the system. The...
x[n] is the input of a system and y[n] is the output of the system. The relationship between the input and output is the following: y[n] = x[n]u[n+1] a) Is the system memoryless? Just yes or no is sufficient. b) Is this system causal? Just yes or no is sufficient. c) Is the system linear? Just yes or no is sufficient. d) Is the system time invariant? Justify. e) Is the system BIBO stable? Justify. f) Is the system invertible?...
An FIR system produced an output y[n] as given below for an input x[n] = {1,1,1,1},...
An FIR system produced an output y[n] as given below for an input x[n] = {1,1,1,1}, y[n] = {6,11,15,18,14,10,6,3,1}. Find the FIR system. Use bk, d(n-k) equation if applicable. Thanks!
describe the saudi aramco company in terms of its input and output components, attributes, and relationships
describe the saudi aramco company in terms of its input and output components, attributes, and relationships
Use matlab backslash operator to output the solution of system of equation.
Use matlab backslash operator to output the solution of system of equation.Print the unknowns in console.
Write a user-defined MATLAB function, with two input and two output arguments that determines the height...
Write a user-defined MATLAB function, with two input and two output arguments that determines the height in centimeters (cm) and mass in kilograms (kg)of a person from his height in inches (in.) and weight in pounds (lb). (a) Determine in SI units the height and mass of a 5 ft.15 in. person who weight 180 lb. (b) Determine your own height and weight in SI units.
This exercise stresses the relationships between the information recorded in a periodic inventory system and the...
This exercise stresses the relationships between the information recorded in a periodic inventory system and the basic elements of an income statement. Each of the five lines represents a separate set of information. You are to fill in the missing amounts. (Enter loss amounts as a negative number.) Not necessarily looking for the answer but trying to find out the calculations of net sales, ending inventory, exepenses, and net income or (loss). Thanks!
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT