randrice.m

来自「mimo在cost207信道下的链路的代码」· M 代码 · 共 43 行

M
43
字号
function a=randrice(Ak,sigma,N)
% function a=randrice(Ak,sigma,N)
% 
% This function creates a Ricean distributed random variable with mean
% value Ak and variance sigma. A set of Nx1 values is computed.
%
%  Copyright (C)2005  Helmut Hofstetter
% 
%  This program is free software; you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation; either version 2 of the License, or
%  (at your option) any later version.
% 
%  This program is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
% 
%  You should have received a copy of the GNU General Public License
%  along with this program; if not, write to the Free Software
%  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
% 
%----------------------------------------------------------------------%
%                                                                      %
%              Author: Helmut Hofstetter <hofstetter@ftw.at>           %
%             Created: 25/05/2005 by HH                                %
%   Last modification: 18/08/2005 by HH                                %
%        Organization: Telecommunications Research Center Vienna,      %
%                      Tech Gate Vienna,                               %
%                      Donau-City Str. 1 / 3rd floor,                  %
%                      A-1220 Vienna, Austria.                         %
%             Project: FTW C9 "MIMO UMTS for future packet services"   %
%    Deliverable Type: This M-file is public available                 %
%                 URL: http://www.ftw.at/cost273/                      %
%         Source Code: MATLAB v7.0 SP2                                 %
%             History:                                                 %
%             Created: 1.00, 25/05/2005 by HH (ftw)                    %
%                                                                      %
%----------------------------------------------------------------------%

a=sqrt(abs(randn(N,1)*sigma+j*randn(N,1)*sigma+Ak^2/2));
    
    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?