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

📄 exm05111_1.m

📁 这是本人收集的一些程序源代码
💻 M
字号:
%exm05111_1.m
t=linspace(0,5,100);y=1-cos(3*t).*exp(-t);
shg
plot(t,y,'b');grid;hold on,plot(t,0.95*ones(size(t)),'r');hold off  
t_ginput=ginput(1)  
%
it=min(find(y>0.95));
T=(it-3):(it+3);														%	<2>
t_nearst=interp1(y(T),t(T),0.95,'nearst');						%	<3>
t_linear=interp1(y(T),t(T),0.95);									%	<4>
t_cubic=interp1(y(T),t(T),0.95,'cubic');							%	<5>
t_spline=interp1(y(T),t(T),0.95,'spline');						%	<6>
disp(['  t_nearst  t_linear   t_cubic   t_spline'])
disp([t_nearst  t_linear   t_cubic   t_spline])  
%
t_zero=fzero('1-cos(3*x).*exp(-x)-0.95',0.5)  

⌨️ 快捷键说明

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