MATLAB: How can i complete the sequence till n=50

discrete time equationdsphomework

Consider the following formula
x[n]=x[n-1]+x[n-3]
x[0]=0
x[1]=1
x[2]=2

Best Answer

Here's a start:
x = zeros(1, 50);
x(1:3) = [0,1,2]
for n = 4 : length(x)
I'm sure you can finish the last two lines.