Info
此问题已关闭。 请重新打开它进行编辑或回答。
Did I set the problem correctly?
1 次查看(过去 30 天)
显示 更早的评论
https://gyazo.com/a6c00ee08cdd03c313b4be970d361ac0
This is my code:
clear all;clc;
N=1;
SI= exp(-1.*N);
tol = 10.^(-1.*10);
y = zeros(1,0);
while 1,
SI= exp(-1.*N);
y(1,end+1) = SI + rand;
if SI<=tol
break;
end
N=N+1;
end
k=0:10:230;
y
N ;%number of iterations N that were required for convergence
%Plotting
plot(k,y)
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!