This video explains how to design a stateflow chart to calculate the sum of factorial of first N natural numbers. N is a positive integer taken as an input.
You can view below videos where it is shown how to compute just the factorial of Nth number.
Below video shows the steps to compute Factorial in MATLAB and Stateflow:
Below video shows the steps to compute Factorial in Simulink:
We will be glad to hear from you regarding any query, suggestions or appreciations at: email@example.com
function outputArg = Factorial_Sum(inputArg)
outputArg = 0;
for i = 1:inputArg
outputArg = outputArg + factorial(i);