Risanuri Hidayat

Teknik Elektro FT UGM

    • currently online
    • maximum concurrent
    • 1 total visitors

Interpolasi Linear dengan Pelatihan

Posted by admin on April 6th, 2011

function linear01;
close all;
clear all;
clc;

fy = [ ...
0 1.0714;...
0.1000 1.2124;...
0.3000 1.2358;...
0.4000 1.3254;...
0.5000 1.0906;...
0.8000 1.3600;...
0.9000 1.5190;...
1.0000 1.5816 ];

xx = fy(:,1);
% A = [ ((fy(end,2)-fy(1,2))/(fy(end,1)-fy(1,1))) fy(1,2)]; % randn(1,2);
A = [1 fy(1,2)];
galat = 1;
n = 1;
terr(1) = 1;

yy = A(1,1).*xx + A(1,2);

while (abs(galat)>0.00001)
n=n+1;
err1 = fy(:,2)-yy;
err2 = abs(err1);
terr1(n) = sum(err1);
terr2(n) = sum(err2);

A(1,1) = (A(1,1)+0.1*terr1(n));

yy = A(1,1).*xx + A(1,2);
err1 = fy(:,2)-yy;
err2 = abs(err1);
terr1(n) = sum(err1);
terr2(n) = sum(err2);

A(1,2) = (A(1,2)+0.1*terr1(n));

galat = terr1(n)-terr1(n-1);
yy = A(1,1).*xx + A(1,2);
end;

terr1
A

subplot(2,1,1);
plot(xx,yy,’-bd’,'LineWidth’,1,’MarkerEdgeColor’,'k’,'MarkerFaceColor’,[.5 .5 .5],’MarkerSize’,12); hold on;

x = fy(:,1);
y = fy(:,2);
plot(x,y,’-wo’,…
‘LineWidth’,2,…
‘MarkerEdgeColor’,'k’,…
‘MarkerFaceColor’,[.49 1 .63],…
‘MarkerSize’,12); grid on;

subplot(2,1,2);
plot(terr1,’-bd’,'LineWidth’,1,’MarkerEdgeColor’,'k’,'MarkerFaceColor’,[.5 .5 .5],’MarkerSize’,12); hold on;
plot(terr2,’-ro’,'LineWidth’,1,’MarkerEdgeColor’,'k’,'MarkerFaceColor’,[.5 .5 .5],’MarkerSize’,12); grid on;

end

.

terr1 =

0 -1.3050 -0.1566 -0.0188 -0.0023 -0.0003 -0.0000 -0.0000 -0.0000

A =

0.7528 0.9231

>>

.
matlab-interpolasi-linear

4 Responses to “Interpolasi Linear dengan Pelatihan”

  1. 4 star hotels in benalmadena costa spain Says:

    4 star hotels in benalmadena costa spain…

    Risanuri Hidayat » Blog Archive » Interpolasi Linear dengan Pelatihan…

  2. Albox apartments for sale Says:

    Albox apartments for sale…

    Risanuri Hidayat » Blog Archive » Interpolasi Linear dengan Pelatihan…

  3. sklandymas.lt Says:

    sklandymas.lt…

    Risanuri Hidayat » Blog Archive » Interpolasi Linear dengan Pelatihan…

  4. oxford intellectual property law moot 2013 Says:

    oxford intellectual property law moot 2013…

    Risanuri Hidayat » Blog Archive » Interpolasi Linear dengan Pelatihan…

Leave a Reply

You must be logged in to post a comment.