clear all;
close all;
clc;
syms k positive ;
syms f;
delt=unifrnd(0,1,1,15);
m=normrnd(0,1,1,15);
pc=(1/sqrt(2*pi*3.0e5))*exp(-f^2/(2*3.0e5))+(1/sqrt(2*pi*3.0e5))*exp(-(f-3.0e5)^2/(2*3.0e5));
pn=1;
hf=0;
for j=1:1:15
hf=(hf+m(j)*exp(-2*i*pi*f*delt(j)*1e-6));%杂波功率谱表达式
end
y=@(f)(abs(hf).*sqrt(1/k)-pn)./pc;
g=@(k)quadl(y,k,-5.e6,5.e6)-1.0e6;
k=fzero(g,1);
程序报错,求大牛帮我解决~~~感激不尽~~
??? Error using ==> fzero at 317
FZERO cannot continue because user supplied function_handle ==> @(k)quadl(y,k,-5.e6,5.e6)-1.0e6
failed with the error below.
Undefined function or method 'isfinite' for input arguments of type 'sym'.
Error in ==> jifen at 16
k=fzero(g,1);
![fzero求解含参定积分方程中参数时,出错,求各位大牛帮忙~]()
ff.jpg
[ Last edited by whyandong on 2014-3-18 at 10:07 ] |