Control 2 servos with a matlab script

I am trying to control 2 servos with a matlab script.
i have the arduino code but i can’t get the matlab script to work.
Can someone help with the matlab script code?


Servocontroll.ino (1.12 KB)

I think it will be much easier if you get your Matlab program to send (for example) <a, 123> and use the third example in serial input basics to receive the data in your Arduino and use the parse example to put the data into the appropriate variables.