function value = qq ( x, problem ) %% QQ returns the value of the coefficient function Q(X). % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 03 November 2006 % % Author: % % Original FORTRAN77 version by Max Gunzburger, Teresa Hodge % MATLAB version by John Burkardt % % Parameters: % % Input, real X, the evaluation point. % % Input, integer PROBLEM, indicates the problem being solved. % 1, U=1-x**4, P=1, Q=1, F=1.0+12.0*x**2-x**4. % 2, U=cos(0.5*pi*x), P=1, Q=0, F=0.25*pi*pi*cos(0.5*pi*x). % % Output, real VALUE, the value of Q(X). % % % Test problem 1 % if ( problem == 1 ) value = 1.0; % % Test problem 2 % elseif ( problem == 2 ) value = 0.0; end return end