|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
出错代码:
% do a quasi-Newton maximization on the windowed signal
% a longer window is useful here.
Z = 4;
rt = round(t);
if ( (rt-Z*M < 1) & (rt+Z*M > N) )
xx = [zeros(Z*M-rt+1,1) ; x ; zeros(Z*M-N+rt,1)];
elseif (rt-Z*M < 1)
xx = [zeros(Z*M-rt+1,1) ; x(1:rt+Z*M)];
elseif (rt+Z*M > N)
xx = [x(rt-Z*M:N) ; zeros(Z*M-N+rt,1)];
else
xx = x(rt-Z*M:rt+Z*M);
end
opt = foptions;
P =fmincon('f_chirp',[Z*M+1+(t-rt) f c d],xx,[1 0 -inf .25],[2*Z*M+1 2*pi inf N/2],'g_chirp',opt);
P(1) = rt + P(1) - (Z*M+1);
P(2) = mod(P(2),2*pi);
if (verbose) fprintf(1,'constr -> t = %7.2f, f = %4.2f, c = %7.4f, d = %6.2f\n', P), end
出错提示:
??? Error using ==> fmincon at 504
FMINCON cannot continue because user supplied objective function failed with the following error:
Input argument "x" is undefined.
Error in ==> best_chirplet at 90
P =fmincon('f_chirp',[Z*M+1+(t-rt) f c d],xx,[1 0 -inf .25],[2*Z*M+1 2*pi inf N/2],'g_chirp',opt);
Error in ==> find_chirplets at 52
P = best_chirplet(e, level, M, verbose, c, d);
Error in ==> demo_chirplets at 30
P1 = find_chirplets(xn,3); |
|