view test/nest/recursive_nest2.m @ 17466:cf5a8fccfc63

area.m: Overhaul function to fix color cycling. * scripts/plot/area.m: Fix color cycling. Fix input validation and make it more precise. Add %!error tests for input validation.
author Rik <rik@octave.org>
date Wed, 18 Sep 2013 19:43:09 -0700
parents be18c9e359bf
children
line wrap: on
line source

# recursive_nest2.m
function x = recursive_nest2 ()
  x = B (20);
  function v = B (n)
    Y = 0;
    BB (n);
    C;
    v = Y;
    function BB (m)
      if m > 0
	Y = Y + 1;
	BB(m - 1);
	C;
      end
    endfunction
  endfunction

  function C
    Y = 0;
  endfunction
endfunction