Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

x=[0.

6363746828274826
0.7560869674158176
0.0704511036128657
0.2284332687903065
0.1546459129938831
0.7864365064615185
0.3621266575704474
0.4393257928123879
0.8842435790930517
0.6174748952782313
0.7209719854373791
0.301921238377183
0.1812490290815749
0.317997513008547
0.3890718393863717];
y=[1.599713537570248
1.874948713248362
0.8089095860861741
1.168181897781003
0.4815519123253479
1.136445869088546
1.153802160481657
0.8517871700066846
1.634947181043142
0.9498737250325416
1.669397561272738
1.140356004935548
0.3228280828873857
1.209446670359108
0.9118797817300037];
%M1 is M-1
M1=0;%M1 varies with next iterations ...that is change to 1 and 2
M=M1+1;
for i=1:15
for j=1:M
A(i,j)=power(x(i),j-1);
end
end
d=pinv(A);
c=d*y;

You might also like