function fx = quartic ( x ) %% QUARTIC evaluates a function defined by a sum of fourth powers. % % Modified: % % 28 February 2008 % % Author: % % John Burkardt % % Reference: % % R ONeill, % Algorithm AS 47: % Function Minimization Using a Simplex Procedure, % Applied Statistics, % Volume 20, Number 3, 1971, pages 338-345. % % Parameters: % % Input, real X(10), the argument. % % Output, real FX, the value of the function. % fx = 0.0; for i = 1 : 10 fx = fx + x(i) * x(i) * x(i) * x(i); end