Claseejercicios.docx

  • Uploaded by: Fio Rodriguez Iparraguirre
  • 0
  • 0
  • April 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 Claseejercicios.docx as PDF for free.

More details

  • Words: 42
  • Pages: 2
function y=MATRIZ(x,n) %precondiciones acepta dos valores x=vector de numeros reales y %n=entero positivo. %postcondiciones: devuelve y=ones(size(x)); t=ones(size(x)); for k=1:n t=x.*t/k; y=y+t; end

m=100; x=linspace(-1,1,m); y=[]; exacto=exp(x); k=0; for n=[4 8 16 20] for i=1:m y(i)=MATRIZ(x(i),n); end errorrel=abs(exacto-y)./exacto; k=k+1; subplot(2,2,k) plot(x,errorrel) title(sprintf('n=%2.Of',n)) end

More Documents from "Fio Rodriguez Iparraguirre"

Informe-quimica.docx
April 2020 2
Claseejercicios.docx
April 2020 2
Estructura.docx
April 2020 3
Lampiran Kronologi Pera.docx
December 2019 11
October 2019 10