Home Difference equation solve with dirac function and 2 condition
 I have this difference equation and need to plot in matlab y[n+3]+8y[n+2]+3y[n]=dirac[n] y[0]=9 y[1]=23 y[2]=7  since i cant indicate 0 in matlab I use to write like this y = zeros(1, 1009); % Pre-allocate the range y(1) = 9; y(2) = 23; y(3) = 7; for n = 1:1006 y(n+3) = (dirac(n) - 8*y(n+2) - 3*y(n)); end u = 1:1009; stem(u,y)  however I think the result i got is totally wrong. Am I doing that right? plot image