fact - if n == 6 out = 1 else out = n*fact(n-1 end

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% 3/31/2011 % Topic: Recursive (iteration) % %writing 5! as a function: function out = fact(n)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if n == 6 out = 1; else out = n*fact(n-1); end...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online