nag_interp_1d_ratnl_eval (e01rb) evaluates continued fractions of the form produced by
nag_interp_1d_ratnl (e01ra).
nag_interp_1d_ratnl_eval (e01rb) evaluates the continued fraction
where
and
for a prescribed value of
.
nag_interp_1d_ratnl_eval (e01rb) is intended to be used to evaluate the continued fraction representation
(of an interpolatory rational function) produced by
nag_interp_1d_ratnl (e01ra).
This example reads in the arguments
and
of a continued fraction (as determined by the example for
nag_interp_1d_ratnl (e01ra)) and evaluates the continued fraction at a point
.
function e01rb_example
fprintf('e01rb example results\n\n');
x = [0:4];
f = [4 2 4 7 10.4];
[m, a, u, ifail] = e01ra( ...
x, f);
x = 6;
[f, ifail] = e01rb( ...
a, u, x, 'm', m);
fprintf('x = %12.4e\n',x);
fprintf('R(x) = %12.4e\n',f);