function [ x f a b c d ] = sunflower( params, x0, x1, m, n ) %SUNFLOWER Summary of this function goes here % Detailed explanation goes here a = params(1); b = params(2); c = params(3); d = params(4); f = @(x0, x1) (a + b*x1).*(x1 + x0)./(1 + c*x1.^2 + d*x0.^2); for j = 1 : m x = f(x0,x1); x0 = x1; x1 = x; end x = zeros(1,n); x(1) = x0; x(2) = x1; for j = 3 : length(x) x(j) = f(x(j-2), x(j-1)); end end