-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathfindMatlab.bat
More file actions
34 lines (31 loc) · 806 Bytes
/
findMatlab.bat
File metadata and controls
34 lines (31 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
set matexe=""
set ismatlab=1
set matopts=""
FOR /d %%f in ("C:\Program Files\MATLAB\*" "C:\Program Files (x86)\MATLAB\*" "D:\Program Files\MATLAB\*") DO (
if exist "%%f\bin\matlab.exe" (
set matexe="%%f\bin\matlab.exe"
set matopts="-nodesktop"
set ismatlab=1
rem exit /b
)
)
FOR /d %%f in ("C:\Program Files\Octave\*" "C:\Program Files (x86)\Octave\*" "C:\Octave\*") DO (
if exist "%%f\bin\octave.exe" (
set matexe="%%f\bin\octave.exe"
set ismatlab=0
set matopts="--line-editing"
rem exit /b
)
if exist "%%f\bin\octave-cli.exe" (
set matexe="%%f\bin\octave-cli.exe"
set ismatlab=0
set matopts="--line-editing"
rem exit /b
)
if exist "%%f\bin\octave-gui.exe" (
set matexe="%%f\bin\octave-gui.exe"
set ismatlab=0
set matopts="--no-gui"
rem exit /b
)
)