clear

valg=1;
h=.01;
x=0:h:4;
y=zeros(length(x),1);
y(1)=1;

%eksplisitt euler
if valg==1
    for i = 1:length(x)-1
        y(i+1)=(1-h*30)*y(i);
    end
end

%implisitt euler
if valg==2
    for i = 1:length(x)-1
        y(i+1)=y(i)/(1+h*30);
    end
end

plot(x,y)
disp(y(end))
    



