⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quad2.m

📁 数字通信第四版原书的例程
💻 M
字号:
function [maximum,err]=quad2(pts,checkpt,location)
%QUAD2	Quadraticly interpolates three points to find the maximum value.
%	QUAD2(PTS,CHECKPT,LOCATION)
%	The second argument, CHECKPT, is for estimation of the error 
%	in the interpolated maximum. 
c=pts(1);
ab=[-1 0.5; 2 -0.5]*(pts(2:3)-c*ones(2,1));
stepmin=-ab(2)/(2*ab(1));
maximum=ab(1)*stepmin^2+ab(2)*stepmin+c;
if nargin>1
	if location==0
		checkpt2=-abc(1)+abc(2)-abc(3)+d;
	else
		checkpt2=64*abc(1)+16*abc(2)+4*abc(3)+d;
	end
	err=checkpt-checkpt2;
end

⌨️ 快捷键说明

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