numBins = 256;

% Define pixelcontrol bus at base workspace
pixelcontrolbus;

% Define bus object with pixelcontrol bus elements 
pctrlbuses = Simulink.Bus;

e1 = Simulink.BusElement;
e1.Name = 'pctrl1';
e1.DataType = 'pixelcontrol';

e2 = Simulink.BusElement;
e2.Name = 'pctrl2';
e2.DataType = 'pixelcontrol';

e3 = Simulink.BusElement;
e3.Name = 'pctrl3';
e3.DataType = 'pixelcontrol';

e4 = Simulink.BusElement;
e4.Name = 'pctrl4';
e4.DataType = 'pixelcontrol';

pctrlbuses.Elements = [e1,e2,e3,e4];