I understand that you have set the callback function to be triggered when bytes-available event is generated. In your case since you have set the 'BytesAvailableFcnCount' to 1, bytes-available event would be generated everytime a byte is available in the input buffer.
Use 'fprintf' or 'fwrite' after you open the serial object to send data/command to the device i.e if device has to receive some instruction/command to send the data back as a reply.
Once device starts sending data, input buffer receives bytes thus generating bytes-available event. that in turns calls a callback function.
At this moment, there are bytes available in the input buffer when the callback function is called and you can place the 'fread' to read the data from the input buffer and 'if' logic to compare the bytes and send the data accordingly to the device using 'fwrite' inside the callback function.
For example: Following callback function reads the data sent by the device which is available in the the input buffer.
function CallBack(serialObj, event)
if ~(isfield(event, 'Type') && isfield(event, 'Data'))
EventType = event.Type;
bytesToRead = get(serialObj, 'BytesAvailablefcnCount');
T = fread(serialObj, bytesToRead, 'uchar')';
You can also refer to the 'instrcallback' template by entering the following command in MATLAB command window and base your callback function accordingly