Possibilities to read initialization parameter in a simulation script

Hi,
Is it possible to read parameters used in a initialization file .m in a simulation script?
I would like to create a steps simulation with calculation based on the initialization file .m?
Many Thanks

1 Like

Hi,
This depends on the scripting environment you’re using. If you are working with PLECS Standalone, which uses an internal scripting engine based on Octave, then yes—it is possible to read and use parameters from an .m initialization file. You can execute such a file within a simulation script using the command run("filename.m").

Please find a simple example attached to this post:
test.plecs (2.0 KB)
init.m (31 Bytes)