'String' 'String' 'String': Function
'String' 'String' 'String': Function
x=str2num(get(handles.edit1,'string'));
y=str2num(get(handles.edit2,'string'));
a=str2num(get(handles.edit3,'string'));
w=length(x);
L=zeros(w,w);
for k=1:w
V=1;
for j=1:w
if k~=j
V=conv(V,poly(x(j)))./(x(k)-x(j));
end
end
L(k,:)=V;
end
C=y*L;
Pa=polyval(C,a);
L='Coeficientes';
L=strvcat(L,num2str(C));
set(handles.listbox1,'string',L);
set(handles.edit4,'string',Pa);
%Grafica
y1=polyval(C,x);
plot(x,y1,'squarer','MarkerFaceColor','m','MarkerSize',8);
hold on
x1=x(1):0.1:x(w);
y=polyval(C,x1);
plot(x1,y)
grid on
hold off
PROGRAMACION