I'm trying to add some menu customizations. I'm starting with this Mathworks Example. However, it's not working. When running the code I get the following error.
_Not enough input arguments.
Error in simulinkMenuCustomisation (line 3) cm.addCustomMenuFcn('Simulink:ToolsMenu', @getMyMenuItems);__
function sl_customization(cm) % Register custom menu function.
cm.addCustomMenuFcn('Simulink:ToolsMenu', @getMyMenuItems);endfunction schemaFcns = getMyMenuItems(callbackInfo) schemaFcns = {@createBO};endfunction schema = createBO(callbackInfo) schema = sl_action_schema; schema.label = 'Align Inputs to Ports'; schema.statustip = 'Align Inputs to Ports'; schema.accelerator = 'Crtl+Alt+I'; schema.callback = @createBOcb;endfunction createBOcb(~) blockH = find_system(gcbh); disp(get(blockH,'Name'))end
Best Answer