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

📄 q412.m

📁 电路与系统专业的matlab程序。有很多经典的实例。
💻 M
字号:
% 求极值
fn=' 2*exp(-x)*sin(x) ';	%  define function for min

ezplot 2*exp(-x)*sin(x),grid on
xmin=fminbnd(fn ,-4,2 )	%  search over range 2<x<5
x=xmin;	%  
ymin=eval(fn,x) 	%  evaluate at xmin
hold on
plot(xmin,ymin,'o')
fx=' -2*exp(-x)*sin(x) ';	%  define for max:note minus sign
figure(2)
ezplot -2*exp(-x)*sin(x),grid on
xmax=fminbnd(fx ,-3,-1)	%  search over range 0<x<3
x=xmax;	%  
ymax=eval(fx)	%  evaluate at xmax
hold on
plot(xmax,ymax,'*')

⌨️ 快捷键说明

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