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

조회 수: 2 (최근 30일)
Kin Sun Wong
Kin Sun Wong 2019년 1월 18일
답변: amin ali 2021년 9월 11일
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
madhan ravi
madhan ravi 2019년 1월 18일
I mean which release are you using 2018 a ?
Kin Sun Wong
Kin Sun Wong 2019년 1월 18일
Oh yes, I am using the R2018a.

댓글을 달려면 로그인하십시오.

답변 (2개)

madhan ravi
madhan ravi 2019년 1월 18일
change
function interval(x)
to
function interval
  댓글 수: 14
Kin Sun Wong
Kin Sun Wong 2019년 1월 18일
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.
madhan ravi
madhan ravi 2019년 1월 18일
oh good , glad that you found , anytime :)

댓글을 달려면 로그인하십시오.


amin ali
amin ali 2021년 9월 11일
hello
can you help me

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by