Using function simple equation doesn't work

1 回表示 (過去 30 日間)
Krystian Wiewiór
Krystian Wiewiór 2019 年 5 月 8 日
コメント済み: gonzalo Mier 2019 年 5 月 9 日
Hello guys,
Could you tell me why my function doesn't work, without block "fcn" - "Pikr1" everything works and scope shows me results.
How to use this "fcn" block, I would like to put there my own variable which is counted from output "p".
matlabscreeen.JPG
Greetings,
Krystian

採用された回答

gonzalo Mier
gonzalo Mier 2019 年 5 月 8 日
編集済み: gonzalo Mier 2019 年 5 月 8 日
Next time, I ask you to add more info so people can help you easily and not only with a photo.
The problem here is the block fcn "Pikr1" accepts as parameter a formula with the input u. So if you want to do p*p you have to input in the fcn block the formula u*u.

その他の回答 (1 件)

Krystian Wiewiór
Krystian Wiewiór 2019 年 5 月 9 日
編集済み: Krystian Wiewiór 2019 年 5 月 9 日
Thank you,
It works, but what in situations if I have many inputs and need to write an equation in one "fcn" block.
I know it is possible with "MUX" but what should I do next with this?
Greetings,
K.
---
I think I found out the answer I just write "u(1)*u(2)" for example
  1 件のコメント
gonzalo Mier
gonzalo Mier 2019 年 5 月 9 日
You are right, use "u(1)*u(2)"

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by