フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can a function know in which block it is executed?

1 回表示 (過去 30 日間)
Rob
Rob 2013 年 5 月 23 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a wireless sensor network simulator in Matlab. Simulator has n sensor nodes with names from 'Sensor node1' to ['Sensor node' n].
Each sensor node contains an Attribute function block, which contains a fcn function.
How can this function know in which sensor it is run? In other words: How can function get 'Sensor node1' when run in 1st sensor node and get 'Sensor node9' when run in 9th sensor node? Thanks a lot.
  2 件のコメント
Rob
Rob 2013 年 5 月 24 日
Hello...
Can anyone give a hint? Thnx.
Ryan G
Ryan G 2013 年 5 月 24 日
You can use an input or create a mask that would allow you to input that parameter. It should work just like a MATLAB fcn block if i'm not mistaken:

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by