Bash loop avorted because of Matlab (I think)

2 ビュー (過去 30 日間)
Cyril GADAL
Cyril GADAL 2016 年 3 月 10 日
コメント済み: Jamal Mousavi 2020 年 4 月 17 日
Hello everyone. First, I'm sorry for all the mistakes I can make in english, however you should be able to understand me. Here is the matter : I have a bash script and there is inside this kind of loop :
while IFS=' ' read var1 var2
....
./matlab.bash
done < file.txt
And there is inside the matlab.bash script only bash commands, exept this one :
matlab -nodesktop -nosplash -r sigma_fit
The fact is that the which loop stoped after the first iteration, and it's because of this matlab command, because when I comment it, the loop do all the iteration. Is there any well known kind of interaction between matlab and bash loops ?
Just to know : sigma_fit is a matlab script ended by quit.
Thank you for your answers !!
Kind regards,
Liris
  3 件のコメント
Cyril GADAL
Cyril GADAL 2016 年 3 月 11 日
編集済み: Cyril GADAL 2016 年 3 月 11 日
"Which loop stoped" is "While loop stopped", sorry for the mistake. It's the loop in the the script I put in the main post. I did not get any error message. It just run, start matlab, close matlab, print "Firt iteration done" (because I put this at the end of the loop in the main script to see if, indeed, the first iteration was fully done), and nothing more, I'm back in the terminal like :
>> ~/home/.../src$
And I can do use it normally, with ls, cd, etc...
Thank you for your answer by the way !!
Jamal Mousavi
Jamal Mousavi 2020 年 4 月 17 日
Did you find a solution for this problem?
I have faced the same.
Thanks

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by