?? alamouti.m
字號:
function [st, st_rate]=alamouti(x1, x2);
%Get the Alamouti matrix.
%x1 and x2 can be vectors.
%
%
if size(x1, 1)>1 && size(x1, 2)>1 | size(x2, 1)>1 && size(x2, 2)>1,
disp('[alamouti]Error: Input should be vectors.');
st=[];
return;
end
if length(x1)~=length(x2),
disp('[alamouti]Error: Two input vector should have the same length.');
end
%make x1 and x2 vectors.
if size(x1, 2)>1,
x1=x1.';
end
if size(x2, 2)>1,
x2=x2.';
end
%dimension of the space-time code
%p is the number of inputs for a block per transmitter
%q is the number of outputs for a block per transmitter
%space_len is the number of transmitters
space_len=2;p=2;q=2;
time_len=q*length(x1);
%rate of the orthogonal codes.
st_rate=p/q;
%construct Alamouti matrix.
st=zeros(time_len, space_len);
index1=1:q:time_len;
index2=index1+1;
st(index1, :)=[x1 x2];
st(index2, :)=[-conj(x2) conj(x1)];
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -