From: <mtm...@us...> - 2012-05-05 00:05:15
|
Revision: 10363 http://octave.svn.sourceforge.net/octave/?rev=10363&view=rev Author: mtmiller Date: 2012-05-05 00:05:09 +0000 (Sat, 05 May 2012) Log Message: ----------- comm: marcumq function has been moved to the signal package Modified Paths: -------------- trunk/octave-forge/main/comm/INDEX trunk/octave-forge/main/comm/NEWS Removed Paths: ------------- trunk/octave-forge/main/comm/inst/marcumq.m Modified: trunk/octave-forge/main/comm/INDEX =================================================================== --- trunk/octave-forge/main/comm/INDEX 2012-05-05 00:04:13 UTC (rev 10362) +++ trunk/octave-forge/main/comm/INDEX 2012-05-05 00:05:09 UTC (rev 10363) @@ -177,4 +177,3 @@ vec2mat qfunc qfuncinv - marcumq Modified: trunk/octave-forge/main/comm/NEWS =================================================================== --- trunk/octave-forge/main/comm/NEWS 2012-05-05 00:04:13 UTC (rev 10362) +++ trunk/octave-forge/main/comm/NEWS 2012-05-05 00:05:09 UTC (rev 10363) @@ -1,6 +1,8 @@ Summary of important user-visible changes for communications 1.1.1: ------------------------------------------------------------------- + ** The function `marcumq' has been moved to the signal package + ** The following functions are new: convenc Deleted: trunk/octave-forge/main/comm/inst/marcumq.m =================================================================== --- trunk/octave-forge/main/comm/inst/marcumq.m 2012-05-05 00:04:13 UTC (rev 10362) +++ trunk/octave-forge/main/comm/inst/marcumq.m 2012-05-05 00:05:09 UTC (rev 10363) @@ -1,49 +0,0 @@ -## Copyright (C) 2007 Sylvain Pelissier <syl...@gm...> -## -## 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 3 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, see <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {[@var{Q}] =} marcumq (@var{a}, @var{b}, @var{m}) -## Compute the Marcum Q function. -## @end deftypefn - -function Q = marcumq(a,b,m) - - if nargin < 2 - usage(" marcumq(a,b)\n\tmarcumq(a,b,m)"); - end - - if nargin < 3 - m = 1; - end - - l = max([size(a,1) size(b,1) size(m,1)]); - c = max([size(a,2) size(b,2) size(m,2)]); - a = padarray(a,[l-size(a,1) c-size(a,2)],'replicate','post') - b = padarray(b,[l-size(b,1) c-size(b,2)],'replicate','post'); - m = padarray(m,[l-size(m,1) c-size(m,2)],'replicate','post'); - - if (min(a(:)) < 0 || min(b(:)) < 0) - error("a and b must be positive"); - end - - for n = 1:l - for o = 1:c - k = 1-m(n,o):100; - v = (a(n,o)./b(n,o)).^k.*besseli(k,a(n,o).*b(n,o)); - v = sum(v); - Q(n,o) = v.*exp(-(a(n,o).^2+b(n,o).^2)/2); - end - end -endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |