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 Center および File ExchangeMATLAB 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