I understand you want to use BQL from MATLAB. The below links contain information about using Bloomberg from MATLAB
https://www.mathworks.com/help/datafeed/bloomberg-desktop.html?s_tid=CRUX_lftnav
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!