%SPR_function function y = SPR_function(kappa, t) global RU0 global RUeq y = RU0 + (RUeq - RU0)*exp(-kappa.*t);