Skip to content

Instantly share code, notes, and snippets.

@c1b3rh4ck c1b3rh4ck/antonio.m
Created Nov 10, 2013

Embed
What would you like to do?
Antonio's Problem
% Antonio's Problem
sello=0;
cara=0;
for i=1:10000000
j=10*rand; %obtener el valor aleatorio con decimales.
if (j<=5) %el rango del sello es 1-5 la cara es 6-10
sello=sello+1;
else
cara=cara+1;
end
end
disp('-----------------------');
disp(sprintf('El resultado de Cara es %d',cara));
disp(sprintf('El resultado de Sello es %d',sello));
@c1b3rh4ck

This comment has been minimized.

Copy link
Owner Author

commented Dec 29, 2013

Revisar el tipo de random realizado en matlab para resultados exitosos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.