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.

What programming language is the plecs c script block be used with?

0 votes
197 views
c code on the Matlab function is used on plecs c script all it brought in error. On what code the plecs c script functions should be based? Is it C or C ++ and why is it that a code that runs on Matlab will give different errors inside the plecs c script block?
asked Sep 24, 2023 by Awesome (30 points)

1 Answer

0 votes
The PLECS C-Script block is C based.  There are several means to call C code from Matlab, so perhaps you could clarify which approach you are using in Matlab and an example of the code you are using in PLECS.

All of the Matlab blocks operate differently compared to the PLECS C-Script block, for example different interface approaches and built in macros, so I would not expect one to directly copy/paste the interface code between the two programs.
answered Sep 26, 2023 by Bryan Lieblick (1,909 points)
...