Tuesday, October 6, 2020

Checking orthogonality

 


% %%%%% Orthogonality %%%%%%%%%%

%%%%%%% SURAJ BASTOLA %%%%%%%%%%%%%%

N = 4;

df = 2;

f = 100:df:20+(N-1)*df;

T = 1/df; % different values of symbol duration

t = linspace(0,T,1000);

x = zeros(N, length(t));

for i = 1:length(f)

    x(i,:) = sin(2*pi*f(i)*t);

    subplot(N*2,1,i);

    plot(t,x(i,:));

end

for i = 1:N

    for j = i+1:N

        if i==1

            subplot(N*2,1,N+j);

            plot(t,x(i,:).*x(j,:));            

        end

        fprintf("Correlation(f%d,f%d) = %f \n",i,j,mean(x(i,:)),x(j,:));

    end

end




No comments:

Post a Comment

CHECKING WHETHER THE SYSTEM IS STABLE OR NOT

  % SURAJ BASTOLA % % ==========CHECKING WHETHER SYSTEM IS STABLE OR NOT ================== % H(z) = (2z+0.5)/(z^2+0.5z-1) b = [2 0.5]; a=[1...