Matlab/Simulink S-Function: How to get full block path of S-function

In Matlab/Simulink, you can get the full block path of an S-function using ssGetPath().

Full example

This examle uses an S-Function without any inputs or outputs which prints the full path of the block to the command line during mdlStart().

Add this like any normal S-Function (remember is has no inputs or outputs so just place it anywhere in the model)

Example output:


Check out similar posts by category: Matlab/Simulink, C/C++