x= 100

x =

   100

n= 50

n =

    50

exp_x = my_exp(x,n)

exp_x =

   3.1678e+35


y = -100

y =

  -100

exp_y = my_exp(y,n)

exp_y =

  -1.1009e+35

clc

clear all
erg3

x =

   100


n =

    50


exp_x =

   3.1678e+35


y =

  -100


exp_y =

  -1.1009e+35


ans =

   3.1568e-36


error =

  529.0812

axis ([-200 200 -20 20]);
my_exp
{Error using <a href="matlab:helpUtils.errorDocCallback('my_exp', 'C:\Users\TEMP\Documents\MATLAB\erg3\my_exp.m', 4)" style="font-weight:bold">my_exp</a> (<a href="matlab: opentoline('C:\Users\TEMP\Documents\MATLAB\erg3\my_exp.m',4,0)">line 4</a>)
Not enough input arguments.
} 
oros(1) = 1;
athroisma(1) = 1;
for k = 1:1:n-1
    oros(k+1) = oros(k)*x/k;
    athroisma(k+1) = athroisma(k) + oros(k+1);
end
value = athroisma(n);
diary off
