The ques is to plot the equation on z-plane: x(n)=-a^n*u(-n-1). But in my code,the ROC is plotting outside the circle which should be inside the circle actually. And the stem of the equation should be start from 0 to - scale .Whats's wrong in code?
3 views (last 30 days)
Show older comments
clear all; close all; clc; n=-10:-1; a=2; y =-a.^n.*heaviside(-n-1); figure(1) zplane(y) figure(2) stem(y)
function:function y = heaviside(n) % We assume a vector input
% Our default output value is 0 y = 0 * n; % Now, we find values in n greater than or equal to 0 y(find(n >= 0)) = 1;
1 Comment
Star Strider
on 9 Feb 2016
I do not see that you are using the z transform to transform your ‘x(n)’ to X(z). You need to do that first.
Answers (0)
See Also
Categories
Find more on Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!