function [f,g] = ionosphere_scale(x, S)
persistent F G;
if isempty(F) || isempty(G)
load('tanhEnv', 'ionosphere_scale_f', 'ionosphere_scale_g');
F = ionosphere_scale_f; G = ionosphere_scale_g;
end
f = F(x,S);
if nargout > 1
g = G(x,S);
end
end
