PLEASE HELP WITH PART d I posted a as well because it was me
PLEASE HELP WITH PART (d). I posted (a) as well because it was mentioned in the problem but only need help with (d).
Solution
You are asking only part (d) and I assume that u have MATLAB routine to generate 1000 binary vectors.
MATLAB CODE :
Nx=3;
function (Nx); % function that returns 1000 xi vectors
yi=zeros(1,1000); % intializing the variable vector which stores the summation of all elements in the xi vector
for n=1:1000 % for 1000 vectors calculate summation of xi
for j=1:Nx % for Nx number of elements in xi vector
yi(n)=sum(xi(j)); % calculate sum of elements in vector 1D
end
end
n=1:1000;
stem(n,yi); %plot yi over 1000 values
