Azzera filtri
Azzera filtri

Diary problem in Linux Console

2 visualizzazioni (ultimi 30 giorni)
Javier Naranjo
Javier Naranjo il 10 Ott 2017
Risposto: Jan il 10 Ott 2017
Hello everybody,
I am using diary to collect all my fpritnf of my code. When I run hello.m in Matlab I get the correct outputs but when I execute Matlab from Linux console ./matlab < hello.m the diary output is actually my code!!!!
Why do I have different behaviours of the same function?
Thanks in advance,
Javi

Risposta accettata

Jan
Jan il 10 Ott 2017
Because "< hello.m" pipes the contents of the file to the Matlab console. because it appears there, you find it in the diary also like if you have typed the code manually in the command window.
Use the -r switch instead to execute code:
matlab -r hello.m

Più risposte (0)

Categorie

Scopri di più su Entering Commands in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by