Info

此问题已关闭。 请重新打开它进行编辑或回答。

Did I set the problem correctly?

1 次查看(过去 30 天)
Ruten9
Ruten9 2015-11-10
关闭: MATLAB Answer Bot 2021-8-20
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 个)

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by