stateflow_average

8 ビュー (過去 30 日間)
Murali Mohan
Murali Mohan 2011 年 6 月 20 日
Hi, Can any one help me on this, I have variable count, which is input to stateflow, i need to calculate the average of 3 values inside the stateflow, and stateflow is triggring at every 1sec. guide me how to do it.
Thanks in advance for your help.

回答 (1 件)

Wilfred
Wilfred 2011 年 9 月 14 日
You can use the Matlab mean function in a stateflow action. If your 3 values are x, y and z, then it would be something like
/A=[x y z]; average=ml('mean(A)');
with x, y and z input data to Stateflow and A a local variable with size 3.

カテゴリ

Help Center および File ExchangeComplex Logic についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by