MATLAB: How to get the handle of the current system in Simulink model

simulink

I am using get(gcs, 'Handle') but it is showing invalid handle.

Best Answer

You cannot use 'get' command to get handle of the system. Use get_param instead.
get_param(gcs, 'Handle')