from MATLAB Builder NE Hot Deploy Components by Joe Bienkowski
This application dynamically loads new generated components and automatically executes methods using

calcDisp()
function output = calcDisp()
    y = rand * 4;
    output = ['Deployment 2' ' ' int2str(y)];
end

Contact us at files@mathworks.com