Docsity

PROGRAMMING CODE FOR NUMERICAL METHODS (LINEAR INTERPOLATION), Apuntes de Programación Informática

Vista previa parcial del texto

¡Descarga PROGRAMMING CODE FOR NUMERICAL METHODS (LINEAR INTERPOLATION) y más Apuntes en PDF de Programación Informática solo en Docsity!

clear all clc %programa para realizar interpolacion lineal con 2 puntos disp('ejemplo 0:10') t=input('dame valores del punto 1 '); x=[t] g=input('ingresa una funcion respecto a x '); y=[g] v=input('dame valor limite de las absisas '); r=polyval(x,y,0:.1:v); f=spline(x,y,0:.1:v); r f plot(r) subplot(2,1,2) plot(f)