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 Comments

Why not just call those commands from your code?
I don't know how to do that.

Sign in to comment.

Answers (1)

4 Comments

Can i use command like "sudo apt-get install..." ?
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

Sign in to comment.

Categories

Tags

Asked:

on 11 Sep 2018

Commented:

on 11 Sep 2018

Community Treasure Hunt

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

Start Hunting!