Running some commands in the Command prompt automatically

Is there any way to run some command automatically in the command prompt like "sudo apt-get install ...." every time i run my MATLAB code?

2 commentaires

Why not just call those commands from your code?
Mr. 206
Mr. 206 le 11 Sep 2018
Modifié(e) : Mr. 206 le 11 Sep 2018
I don't know how to do that.

Connectez-vous pour commenter.

Réponses (1)

OCDER
OCDER le 11 Sep 2018

4 commentaires

Can i use command like "sudo apt-get install..." ?
OCDER
OCDER le 11 Sep 2018
Modifié(e) : OCDER le 11 Sep 2018
Did you try?
system('sudo apt-get install ...')
What error are you getting?
It is not saying an error but printing this:
sudo: no tty present and no askpass program specified
ans = 1

Connectez-vous pour commenter.

Catégories

Tags

Question posée :

le 11 Sep 2018

Commenté :

le 11 Sep 2018

Community Treasure Hunt

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

Start Hunting!

Translated by