フィルターのクリア

Calling an external software from MATLAB

2 ビュー (過去 30 日間)
Harsh Shukla
Harsh Shukla 2016 年 8 月 3 日
編集済み: Harsh Shukla 2016 年 8 月 3 日
Hi All,
I am using Linux-mint 18. I want to call external software from MATLAB. Here is what I have done so far but it is not working.
Let's say the name of my software is "my_software". It is located in "/home/hs/my_software" folder. If I want to open it using the terminal, I do "/home/hs/my_software/bin/my_software" and I can open using terminal. I have also created alias for it in .bashrc file. So if I just type in terminal "my_software", it opens the software.
However when I do in MATLAB "system('my_software')" it gives me the error "/bin/bash: my_software:command not found". If I do "system('/home/hs/my_software/bin/my_software')" then it works i.e. it open the software successfully using MATLAB.
May I ask that what I have to do so that my alias also works in MATLAB like in terminal i.e. if I do "system('my_software')" it successfully opens?

採用された回答

Ammar Dodin
Ammar Dodin 2016 年 8 月 3 日
編集済み: Ammar Dodin 2016 年 8 月 3 日
  1 件のコメント
Harsh Shukla
Harsh Shukla 2016 年 8 月 3 日
編集済み: Harsh Shukla 2016 年 8 月 3 日
Thank you. Yes indeed that was something I was looking for. For anyone who is trying to do the same...
  • Install tcsh if it is not installed already. (Synaptic package manager has it)
  • create ~/.cshrc file and put alias there e.g. "alias my_software /home/hs/my_software/bin/my_software". Do not put quotes in .cshrc file by the way.
  • edit ~/.bashrc file and add "export MATLAB_SHELL=/bin/tcsh". Again without quotes
  • Close all the terminals and restart matlab. It should work now.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by