Hi all,
Since I have Matlab Home, I established a connection to my raspi 2, model B with the common commands in the Matlab documentation. Everything work perfectly, besides the "System"-command, where to define a string in Matlab an send it to the raspberry, and getting back an answer.
I only tried the commonly used command "sudo shutdown -h now" defind as follows in the Matlab command line:
Answer=system(myRpiObject,'shutdown -h now','sudo')
I get back "undefined command"
Using the openShell-Command and performing the shutdown is working without issues.
I'm using Matlab 2016 with the Matlab raspberrypi support package and start it with admin privileges.
Regards, Daniel

댓글 수: 2

Walter Roberson
Walter Roberson 2016년 4월 27일
What behaviour are you observing? What is being returned in Answer?
Daniel
Daniel 2016년 4월 27일
편집: Daniel 2016년 4월 27일
Hi Walter, here's the link to the documentation of the "system"-command used with raspberry support package.
I get the Error: undefined Command (black highlighted) and some response from anywhere: error stdout 200 (red highlighted)
Is my syntax for the system command for shutdown rpi from Matlab correct?

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

답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기

태그

질문:

2016년 4월 27일

편집:

2016년 4월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by