Watch this Author's files
Hi Wei,
There is no dependence on whether you use a flow chart or a state diagram for these examples. Each case would support both. Thanks for the question.
Chris, Wonder why to use state in 2 cases and a flow chart in the 3rd in the example. Like to see a comment so there is no confusion.
Contact us at files@mathworks.com