Running exe files in Linux

조회 수: 3 (최근 30일)
SHREENATH KRISHNAMURTHY
SHREENATH KRISHNAMURTHY 2016년 9월 6일
편집: Walter Roberson 2016년 9월 6일
How do i Run the following command in Linux
if 0,
system(strcat('sim/CySim_solver sim/CySim', ' > out'));
else
system(strcat('sim\CySim_solver.exe sim\CySim', ' > out'));
end;

답변 (2개)

Thorsten
Thorsten 2016년 9월 6일
Try
system(strcat('sim/CySim_solver sim/CySim', ' > out'))
  댓글 수: 1
Thorsten
Thorsten 2016년 9월 6일
편집: Thorsten 2016년 9월 6일
ou cannot run the .exe in Linux, at least not simply. Do you have the Linux executable CySim_solver? Can you run it from the command line? Can you run it from the command line when you change to mat labs present working directory (shown when typing
pwd
in Matlab?
You may have to change execution permission to the solver in linux
chmod a+x CySim_solver
and to add the directory of CySim_solver to the PATH or call it in Matlab with the full path.
If you are not familiar with Linux, ask a Linux guy in your team of how to get programs running under Linux. It may be more a Linux problem then a Matlab problem.

댓글을 달려면 로그인하십시오.


SHREENATH KRISHNAMURTHY
SHREENATH KRISHNAMURTHY 2016년 9월 6일
Thanks a lot for your time guys. I have an input file for the solver.exe (both in the folder sim) where a system of DAE's are solved. This command works well in Windows. But I intend to run it in workstation which has UniX. When i Run the command that thorsten had provided i get an error saying /bin/bash: sim/CySim_solver: No such file or directory, although the matlab is able to modify the input file.
  댓글 수: 1
Thorsten
Thorsten 2016년 9월 6일
Please see my comment above.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by