TXT

lagelangri

By Francisco Simmons,2014-07-01 10:02
12 views 0
x=linspace(-5,5,10); for i=1:10 f=5./(1+x.^2); end k=ones(10,10); for j=1:10 for m=1:10 if j~=m k(j,m)=x(j)-x(m); end; end end syms y b=ones(10,10); for j=1:10 for m=1:10 if j~=m h(j,m)=x(m); end end end l=b*y-h; for j=1:10 l(j,j)=1; end l=prod(l,2); q=prod(k,2); q2=q'.^(-1); a=linspace(-5,..

    x=linspace(-5,5,10); for i=1:10

     f=5./(1+x.^2); end

     k=ones(10,10); for j=1:10

     for m=1:10

     if j~=m

     k(j,m)=x(j)-x(m);

     end;

     end

    end

    syms y

    b=ones(10,10);

    for j=1:10

     for m=1:10

     if j~=m

     h(j,m)=x(m);

     end

     end

    end

     l=b*y-h;

     for j=1:10

     l(j,j)=1;

     end

    l=prod(l,2);

    q=prod(k,2);

    q2=q'.^(-1);

    a=linspace(-5,5,100); p=q2*(f'.*l)

    a=linspace(-5,5,100); s= subs(p,'y',a) plot(x,f,'r-*',a,s,'b')

Report this document

For any questions or suggestions please email
cust-service@docsford.com