In Matlab/Simulink, is there a convenient way to determine the depth of the current system, i.e. the numbers of system block borders one has to cross to reach the root level from there? I suppose you can get the pathname of the current system by gcb
and count the number of slashes, but that doesn't seem to be a very natural way to do it.
2
votes