How can I write a Matlab code for a flowchart, under the if and then statement ?
10 ビュー (過去 30 日間)
古いコメントを表示
I want to generate a Matlab code for a flowchart that has if true or false, then... to the next step.
1 件のコメント
John D'Errico
2018 年 1 月 9 日
編集済み: John D'Errico
2018 年 1 月 9 日
Ok. So what have you tried? Did you read the help for if? They put the documentation there for a good reason. In fact, in the docs for if, you will even find examples.
回答 (2 件)
Manan Mishra
2018 年 1 月 12 日
Here are a couple of workflows you can follow:
1. You can write MATLAB code for your flowchart using "if/elseif/else" statements.
Refer the documentation to know the exact syntax and some examples for these statements:
2. If you want to have C/C++ code instead of MATLAB code, you can design your flowchart using "Stateflow" and generate C/C++ code for that chart.
Refer these links for more information on this workflow:
参考
カテゴリ
Help Center および File Exchange で Graphical Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!