function y = testfun (x) persistent z; x = x/2; global sr = localsqrt(x); y = log(sr); end function b = localsqrt (a) b = sqrt (a); endfunction