MATLAB shutdown on iOS: not super-user error

1 visualización (últimos 30 días)
Antonio Carlo Bertolino
Antonio Carlo Bertolino el 31 de Mzo. de 2017
Respondida: Carl el 3 de Abr. de 2017
Hi everyone, I'm trying to run this code on the command window in order to shutdown the computer from MATLAB (I have a very long set of simulations and I would like to switch off my pc at the end):
system('shutdown -s')
The answer is:
shutdown: NOT super-user
Do you know how I can execute it? Or how to obtain the super-user privileges? (I have already tried to switch on the root privileges on iOS but the result was the same).
Thanks a lot, Antonio

Respuestas (1)

Carl
Carl el 3 de Abr. de 2017
You can try starting MATLAB with superuser privileges:
sudo ./matlab
and/or run the command with superuser privileges:
system('sudo shutdown -s')
You can refer to the following page for more information on the 'sudo' command.
https://superuser.com/questions/185441/what-does-the-sudo-command-do

Categorías

Más información sobre C Shared Library Integration en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by