syntax error in simulink
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i cannot run my simulation due on this function. can you help me to identify the problem.
p(1)*u(2) + p(2)*u(1) + p(3)*u(1)*u(1) + p(4)*u(1)*u(2) + p(5)
3 commentaires
Walter Roberson
le 3 Juil 2020
In what you attached, there is no intake manifold, and no blocks that might have the error you posted.
Réponses (2)
Fadzliana Aida
le 3 Juil 2020
1 commentaire
Walter Roberson
le 3 Juil 2020
There are nothing marked as being throttles or manifolds in what you posted.
Fadzliana Aida
le 3 Juil 2020
2 commentaires
Walter Roberson
le 3 Juil 2020
That code works fine when I try it in isolation.
I have attached an example model that uses the block typed in by hand (since you have not attached the actual block.)
Note that in order to use it, you must have a workspace variable named p that has at least 5 elements. The fcn block can use variables other than u but they must be workspace variables.
Voir également
Catégories
En savoir plus sur Event Functions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!