Practica 04

  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Practica 04 as PDF for free.

More details

  • Words: 287
  • Pages: 5
Problema 01 function media fprintf('media\n'); n=input('num iter:\n'); for i=1:n m=input('valores:\n'); A(i,1)=m; end sum(A/n)

>> media media num iter: 3 valores: 4 valores: 5 valores: 6 ans = 5 >>

Prob no 02 function varianza fprintf('varianza y desviacion estandar:\n'); n=input('num iter:\n'); for i=1:n m=input('ingrese valor:\n'); A(i,1)=m; end p=sum(A)/n r=0; for i=1:n q=((A(i,1)-p)^2)/n; B(i,1)=q; end fprintf('varianza\n'); sum(B) fprintf('desviacion estandar\n') sqrt(sum(B))

problema no 03 function media

fprintf('media\n'); n=input('num iter:\n'); for i=1:n m=input('valores:\n'); A(i,1)=m; end sum(A/n) fprintf('varianza y desviacion estandar:\n'); n=input('num iter:\n'); for i=1:n m=input('ingrese valor:\n'); A(i,1)=m; end p=sum(A)/n r=0; for i=1:n q=((A(i,1)-p)^2)/n; B(i,1)=q; end fprintf('varianza\n'); sum(B) fprintf('desviacion estandar\n') sqrt(sum(B))

>> media media num iter: 3 valores: 4 valores: 5 valores: 6 ans = 5 >> media media num iter: 16 valores: .15 valores: .4 valores: .6 valores: 1.01 valores: 1.5 valores:

2.2 2.4 valores: valores: 2.7 valores: 2.9 valores: 3.5 valores: 3.8 valores: 4.4 valores: 4.6 valores: 5.1 valores: 6.6 valores: 7.6 ans = 3.0913 >>

Problema no 04 >> minimo minimo cuadrado ingrese num iteracion 10 datos x 4 datos y 5 datos x 5 datos y 6 datos x 2 datos y 4 datos x 5 datos y 5 datos x 6 datos y 7 datos x 7 datos y

10 datos x 1 datos y 3 datos x 8 datos y 11 datos x 3 datos y 4 datos x 7 datos y 9 suma xi w = 48 suma yi k = 64 suma xi^2Cn l = 278 suma xi*yi ans = 20 30 8 25 42 70 3 88 12 63 v = 361 a =

48 278

10 48

b = 64 361 raices de la recta ax+b g = 1.1303 0.9748 la recta o = 3025

coeficiente de correlacion r = 0.9429 >>

Related Documents

Practica 04
December 2019 6
Practica 04
December 2019 1
Practica 04.docx
December 2019 13
Practica 04 Formulas
June 2020 3
Practica
November 2019 82
Practica
October 2019 95