MATLAB: Generating sequence

mat

how to generate a sequence x of length 200 samples,where the first 30 values equal 1 and the remainder have a value of 0.

Best Answer

a=[ones(30,1);zeros(170,1)]