PLOT function is used for continuous domain functions.
For discrete domain functions, as is the case now, you should use STEM function
So, the command will be something like (I don't have MATLAB installed, so I have not checked it)
> n=-5:0.5:5;
> x(n)=exp(j*(0.4*pi*n-0.5*p
> y(n)=x(n)-x(n-1);
> stem(y,n)
Main Topics
Browse All Topics





by: asood314Posted on 2007-07-21 at 07:25:27ID: 19539221
Matlab has built-in plotting functions. If you go to the help menu and look up "plot", you should be able to find a plotting function that accepts two arrays as parameters.