Anda di halaman 1dari 3

x=2;

h=0,1;

h =

h=0.1;
trn4('tugas2',x,h)

ans =

18

trn5('tugas2',x,h)

ans =

10.0000

trn6('tugas2',x,h)

ans =

2.2204e-13

%soal nomer 2%
x=1;
h=0.13;
trn4('tugas3',x,h)
{#Error using <a href="matlab:helpUtils.errorDocCallback('feval')" style="font-
weight:bold">feval</a>
Undefined function 'tugas3' for input arguments of type 'double'.

Error in <a href="matlab:helpUtils.errorDocCallback('trn4',


'C:\Users\Hisyam\Documents\MATLAB\trn4.m', 8)" style="font-weight:bold">trn4</a>
(<a href="matlab: opentoline('C:\Users\Hisyam\Documents\MATLAB\trn4.m',8,0)">line
8</a>)
Xs=feval(f,xs); Xm=feval(f,xm);
}#
trn5('tugas3',x,h)
{#Error using <a href="matlab:helpUtils.errorDocCallback('feval')" style="font-
weight:bold">feval</a>
Undefined function 'tugas3' for input arguments of type 'double'.

Error in <a href="matlab:helpUtils.errorDocCallback('trn5',


'C:\Users\Hisyam\Documents\MATLAB\trn5.m', 8)" style="font-weight:bold">trn5</a>
(<a href="matlab: opentoline('C:\Users\Hisyam\Documents\MATLAB\trn5.m',8,0)">line
8</a>)
Xo=feval(f,x);
}#
helpUtils.errorDocCallback('feval')
helpUtils.errorDocCallback('feval')
trn4('tugas3',x,h)
{#Undefined function 'ln' for input arguments of type 'double'.

Error in <a href="matlab:helpUtils.errorDocCallback('tugas3',


'C:\Users\Hisyam\Documents\MATLAB\tugas3.m', 2)" style="font-
weight:bold">tugas3</a> (<a href="matlab:
opentoline('C:\Users\Hisyam\Documents\MATLAB\tugas3.m',2,0)">line 2</a>)
y=ln(x);

Error in <a href="matlab:helpUtils.errorDocCallback('trn4',


'C:\Users\Hisyam\Documents\MATLAB\trn4.m', 8)" style="font-weight:bold">trn4</a>
(<a href="matlab: opentoline('C:\Users\Hisyam\Documents\MATLAB\trn4.m',8,0)">line
8</a>)
Xs=feval(f,xs); Xm=feval(f,xm);
}#
trn4('tugas3',x,h)
{#Undefined function 'ln' for input arguments of type 'double'.

Error in <a href="matlab:helpUtils.errorDocCallback('tugas3',


'C:\Users\Hisyam\Documents\MATLAB\tugas3.m', 2)" style="font-
weight:bold">tugas3</a> (<a href="matlab:
opentoline('C:\Users\Hisyam\Documents\MATLAB\tugas3.m',2,0)">line 2</a>)
u=ln(x);

Error in <a href="matlab:helpUtils.errorDocCallback('trn4',


'C:\Users\Hisyam\Documents\MATLAB\trn4.m', 8)" style="font-weight:bold">trn4</a>
(<a href="matlab: opentoline('C:\Users\Hisyam\Documents\MATLAB\trn4.m',8,0)">line
8</a>)
Xs=feval(f,xs); Xm=feval(f,xm);
}#
%soal 1%
x=2;
h=0.1;
trn4('tugas2',x,h)

ans =

18

trn5('tugas',x,h)

ans =

40.0000

trn5('tugas2',x,h)

ans =

10.0000

trn6('tugas2',x,h)

ans =

2.2204e-13

%soal 2%
x=1;
h=0.13;
trn4('tugas3',x,h)

ans =

0.9998
trn5('tugas3',x,h)

ans =

-0.9996

trn6('tugas3',x,h)

ans =

1.9856

diary off