how to get the result of this code in a table like that table attached ' with q=[0.1, 0.2, 0.3, 0.4, 0.5] and z =5

1 visualizzazione (ultimi 30 giorni)
function [y]=Attack(q,z)
p=1-q;
lambda=z*q/p;
sum=1;
for k=0:z
poisson=exp(-lambda);
for i=1:k
poisson=poisson*lambda/i;
end
sum=sum-poisson*(1-((q/p).^(z-k)));
end
y=sum;
end

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by