MATLAB Answers

0

Undefined function 'writePosition' for input arguments of type 'double'

Asked by Kin Sun Wong on 18 Jan 2019
Latest activity Commented on by madhan ravi
on 18 Jan 2019
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:
Screenshot 2019-01-18 at 1.58.11 PM.png
Thank you.

  7 Comments

It's version 9.4.0813654. (64 bit)
I mean which release are you using 2018 a ?
Oh yes, I am using the R2018a.

Sign in to comment.

Products


Release

R2018a

1 Answer

Answer by madhan ravi
on 18 Jan 2019

change
function interval(x)
to
function interval

  14 Comments

how are you calling it ? by pressing the green triangle button ?can you upload the code?
Hi, thanks for the help so far.
I have reinstalled the package and the code is working again. Seems like some of the files got corrupted.
oh good , glad that you found , anytime :)

Sign in to comment.