Remote matlab running: changing folder and running script
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
AES
el 1 de Sept. de 2022
Comentada: AES
el 1 de Sept. de 2022
I was wondering how to change a matlab directory while using ssh in puTTY for a remote session that does not end when I close the ssh terminal.
So far I have:
nohup matlab -nodesktop -nodisplay < sshTest.m &
I have also tried:
nohup matlab -nodesktop -nodisplay < cd(DIRECTORY) sshTest.m &
But I get the following error:
-bash: syntax error near unexpected token `('
My matlab directory is different than the initial directory when I ssh. I am comfortable completing this in several lines, however I am unsure how to include 'nohup' for continued running of the script even if I lose connection to the server within the several line method.
This is how I did it in multiple lines:
matlab -nodesktop -nodisplay
cd(DIRECTORY)
sshTest
Any help is appreciated. Thank you.
0 comentarios
Respuesta aceptada
Steven Lord
el 1 de Sept. de 2022
Instead of piping the contents of the file to MATLAB, use the -batch or -r startup options in conjunction with the -sd startup option.
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!