问题遇到的现象和发生背景 产生一个衰减振荡的余弦波向量,并求震荡幅度衰减不再超过最大幅度百分之十所需要的时间
问题相关代码,请勿粘贴截图
t = 0:0.01:5;
ft = exp(-2t).cos(2pit)
for i = length(ft):-1:1
if ft(i)>0.1
break;
end
end
ts = t(i+1)
t = 0:0.01:5;
ft = exp(-2t).cos(2pit)
for i = length(ft):-1:1
if ft(i)>0.1
break;
end
end
ts = t(i+1)