10/05/2018, 23:56

Hỏi về matlab mong anh chị giải thích cho e ms lệnh này ạ,bjo ms học e ko hiểu j

function [H]= HadamardMatrix(codeSize) %[H]=generateHadamardMatrix(codeSize); % Function to generate Walsh-Hadamard Matrix where "codeSize" is the code % length of walsh code. The first matrix gives us two codes; 00, 01. The second % matrix gives: 0000, 0101, 0011, 0110 and so on % Author: ...

function [H]= HadamardMatrix(codeSize)

%[H]=generateHadamardMatrix(codeSize);
% Function to generate Walsh-Hadamard Matrix where "codeSize" is the code

% length of walsh code. The first matrix gives us two codes; 00, 01. The second

% matrix gives: 0000, 0101, 0011, 0110 and so on

% Author: Mathuranathan for gaussianwaves.com

% License: Creative Commons: Attribution-NonCommercial-ShareAlike 3.0

% Unported


%codeSize=64; %For testing only

N=2;
H=[0 0 ; 0 1];
if bitand(codeSize,codeSize-1)==0
while(N~=codeSize)
N=N*2;
H=repmat(H,[2,2]);
[m,n]=size(H);

%Invert the matrix located at the bottom right hand corner
for i=m/2+1:m,
for j=n/2+1:n,
H(i,j)=~H(i,j);
end
end
end
else
disp('INVALID CODE SIZE:The code size must be a power of 2');
end





2: e muốn hỏi thêm ý nghĩa các lệnh này ạ
scatter
stairs(t,c); axis([0 Hsize+1 -2 2]);
Xcorr
0