It appears to ignore the spring and friction forces because s(i) and v(i) are always 0. That is, s(i) and v(i) are calculated after they are used, each time through the loop, so the s(i) and v(i) used in the force calculations are always the 0 used to initialize s and v. One way to fix this is to use s(i-1) and v(i-1) to calculate a(i), v(i) and s(i).
Also note that you need to include the time-step in calculating velocity from acceleration or position from velocity.
(I don't claim that the following is physically accurate; I used your equations as they were, and just changed time/index-related stuff as described above, but it seems more physically plausible.)
function pendel (m,te,k,c,s0)
t = linspace(1,te,100*te);
v(i) = v(i-1)+a(i)*dt(i-1);
s(i) = s(i-1)+v(i)*dt(i-1);