Hi, I have followed the guide from this page (https://www.mathworks.com/help/supportpkg/arduinoio/ug/control-servo-motors.html) on how to set up the servo motor via Arduino on Matlab.
However, I keep getting the following the error message: Undefined function 'writePosition' for input arguments of type 'double'
This page (https://www.mathworks.com/help//supportpkg/arduinoio/ref/writeposition.html) states that the writePosition function can take in any numeric value from 0 to 1, but yet the error shows up.
Why is this happening?
My code is as shown below: