Borrar filtros
Borrar filtros

How to execute matlab code automatically when windows/Linux boots up?

4 visualizaciones (últimos 30 días)
cui,xingxing
cui,xingxing el 19 de Jul. de 2021
Respondida: Smitesh Patil el 19 de Jul. de 2021
So far I have only seen that the matlab software can be customized to execute automatically when the software is started, but how can the matlab code be executed automatically when windows/Linux is booted?
目前只看到了matlab软件启动时候可以自定义程序自动执行,但是怎样在windows/Linux开机启动时候就自动执行matlab代码呢?

Respuestas (1)

Smitesh Patil
Smitesh Patil el 19 de Jul. de 2021
Since I am familiar with Linux, I can tell how it can be done in linux.
First, write a shell script to launch matlab with the desired script. Something like this,
#!/bin/bash
matlab -r "run('path/to/your/script.m');"
Then, there are multiple ways of launching a shell scripts on startup in linux, but the easiest would be to use a utility called 'cron' to do it. You can find more about how to install cron and set it up here

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by