Metodo Simpsom 1,3 Para Matlab.docx

  • Uploaded by: Daniel Armando Lopez Rodriguez
  • 0
  • 0
  • May 2020
  • 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 Metodo Simpsom 1,3 Para Matlab.docx as PDF for free.

More details

  • Words: 74
  • Pages: 1
clc; clear; a=input('Escribe el valor de (a) la integral\n'); b=input('Escribe el valor de (b) la integral\n'); n=input('Escribe la cantidad de veces que se va a repetir la acción de este método para la aproximación de la integral\n'); x=(1:n+1); fx=(1:n+1); fk=0; fkk=0; if ((-1)^n)==1 h=(b-a)/n; for i=1:n+1 x(i)=a+((i-1)*h); fx(i)=sqrt(1+x(i)); end for k=1:(((n-2)/2)+1) fk=fk+fx((2*k)+1); end fk=fk*4; for k=1:(((n-2)/2)+1) fkk=fkk+fx((2*k)+1); end fkk=fkk*2; A=(h/3)*(fx(1)+fx(n+1)+fk+fkk); disp('\n\nvalor de la integral=') disp(A) else disp('\nLa secuencia de repeticion debe ser par'); end

Related Documents

Metodo-arban-para-tuba.pdf
November 2019 20
Para 13
May 2020 2
Para 13
November 2019 9
Para 13
November 2019 8

More Documents from "Paula Gonzalez"