There are multiple ways to get a block handle in Simulink. You can, for example, select the impulse response block in the Simulink schematic and use
handle = gcbh;
or
plimpulseresponse(gcbh);
directly.Another option is the command getSimulinkBlockHandle() to get the handle from a given model path. See the Matlab/Simulink online help of these commands for more details.