Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

For Loop for Inputs

0 votes
277 views
Maybe I didn't form the question correctly. In the picture attached you can see that C-Script has as Inputs 1_prev, 2_prev, ..., 6_prev, which are signals that indicate 6 different states. How can I define these Inputs inside the C-Script block in a way to place these variables-Inputs in a matrix by using a for loop? You can find the pictures attached.
related to an answer for: Define a matrix of inputs in C-Script
asked Apr 27, 2023 by Magdalini (20 points)
Your question might not be clear still.  Could you post some pseudo code of how you expect your matrix to look in the C-Script and what operations you'd like to do with it?

1 Answer

0 votes
In fact, I want to place the Input Signals in a matrix inside the C-Script, but I want to do it by using a for loop. The thing is that now I have only 6 Input Signals (1_prev, 2_prev...., 6_prev), but later on the Input Signals will increase to 50. So it will be easier to use a for loop I think. Thank you again!
answered May 2, 2023 by Magdalini (20 points)
...