Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Recursive Graphical Functions

This example shows how graphical functions can be used as recursive functions. The graphical function in the chart (called FACTORIAL) returns the factorial value of the input. This is possible because graphical functions can be called from within themselves or from within other graphical functions. The risk in using a recursive function, is the possibility of creating an infinite loop. In this example, FACTORIAL is called when the input value satisfies a certain condition. If the condition is not satisfied, another path within the function is taken and the output in this path is not dependent on the FACTORIAL function.

Was this topic helpful?