conj(z1)with
r1 = abs(z1); theta1 = angle(z1); r1*exp(-j*theta1)If you leave off the semicolon at the end of the command, then the output will be displayed in the window. If you include the semicolon at the end of the command, then the output will not be displayed in the window.
ramp(t) = t u(t)
g[n] = u[n] + u[-n]The Matlab/Mathscript implementation of the unit step function, stepfun(t,0), requires the vector t to be in ascending order. So, simplying writing the Matlab code
n = -10:10; g = stepfun(n,0) + stepfun(-n,0);will produce an incorrect result due to the -n term.
As an alternative, we can use the fliplr function in Matlab/Mathscript to implement -n.
n = -10:10; g = stepfun(n,0) + fliplr(stepfun(n,0));
n = 1:15; comb3 = zeros(1,15); comb3(1:3:end) = 1;