Control a bldc motor and esc using Arduino - Matlab GUI

Hi, I want to control a bldc motor and esc using Matlab GUI and Arduino. Before this, I successfully rotate the bldc motor. But, to ingrate this two software and hardware, I had some problem. To control the motor I’m using servo library. I already make a GUI which is controlling the motor using the slider. The coding is fine, there is no error, but my motor is not working. Attached is my part of Matlab and Arduino code.

Note: My esc need 1000 - 2000 microseconds to give a command to the motor to rotate.