function y = fexmp(x, n) % % FEXMP function example y = x/(x+1) and derivatives: % % y = fexmp(x,n) gives n'th derivative at x. % if nargin == 1 y = x ./ (x+1); elseif n == 0 y = x ./ (x+1); elseif n >= 1 % % n'th derivative of y = x/(x+1) % y = eval(vectorize(sym(diff('x/(x+1)','x',n)))); else disp('ERROR - negative order of differentiation') y = 0/0 end