{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Simulaciones computacionales

# Simulaciones computacionales - Vctor Gonzlez Matrcula...

This preview shows pages 1–3. Sign up to view the full content.

Víctor González Matrícula: 805386 Problema 1 x(1)=5; for i=1:10 x(i+1)=mod(3*x(i),150); end Answer: x = 5 15 45 135 105 15 45 135 105 15 45 Problema 2 x(1)=3; for i=1:10 x(i+1)=mod(5*x(i)+7,200); end Answer: x = 3 22 117 192 167 42 17 92 67 142 117 Problema 3 x=rand(10000,1); suma=0; for i=1:10000 suma=suma+exp(exp(x(i))); end disp([ 'Answer: ' num2str(suma/i)]) Answer: 6.3116 Problema 4 x=rand(10000,1); suma=0; for i=1:10000 suma=suma+((1-x(i)^2)^(3/2)); end disp([ 'Answer: ' num2str(suma/i)]) Answer:: 0.58956 Problema 5 x=rand(10000,1); suma=0; for i=1:10000 suma=suma+4*(exp(4*x(i)-2+(4*x(i)-2)^2)); end disp([ 'Answer:: ' num2str(suma/i)])

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Answer:: 93.194 Problema 6 y=rand(10000,1); suma=0; for i=1:10000 suma=suma+(((1/y(i))-1)*(1+((1/y(i))-1)^2)^-2)/(y(i)^2); end disp([ 'Answer: ' num2str(suma/i)]) Answer: 0.49705 Problema 7 y=rand(10000,1); suma=0; for i=1:10000 suma=suma+(exp(-1*((1/y(i))-1)^2))/(y(i)^2); end disp([ 'Answer: ' num2str(2*suma/i)]) Answer: 1.7858 Problema 8 x=rand(10000,1);
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

Simulaciones computacionales - Vctor Gonzlez Matrcula...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online