MATLAB Answers

2

Restart or Shutdown Raspberry PI crashes Matlab

Asked by vcmorini on 22 Apr 2017
Latest activity Edited by Alejandro Ojeda on 5 Jul 2018
Hi guys,
To restart:
system(raspberrypi,'sudo shutdown -r now')
%or
system(raspi,'sudo shutdown -r now')
It works! Raspberry Pi restarts but Matlab continues busy even after Raspberry Pi has restarted.
Also, I didn't find any documentation about raspberrypi vs raspi, what is the difference between one and other?
Best!

  0 Comments

Sign in to comment.

2 Answers

回答者: Walter Roberson
2017 年 9 月 20 日
 採用された回答

I am not surprised. I would tend to expect that communication with the raspberry follows a protocol, and that MATLAB will continue to believe the connection is busy until it gets the "all done" response, which it is not going to ever get because you rebooted the device.
The raspi object is designed mostly for use from MATLAB; the raspberrypi function is designed mostly for use with Simulink.

  0 Comments

Sign in to comment.


回答者: Mario Frischmann 2017 年 9 月 20 日

Any solutions?

  1 Comment

Alejandro Ojeda 2018 年 7 月 5 日
This is nonblocking
p = raspberrypi;
p.system('sudo shutdown -r +1');

Sign in to comment.