l*******G 发帖数: 1191 | 1 I run matlab in linux with a batch like this:
===matlab_batch.sh===============
#!/bin/bash
#this is my bash program to run matlab code matlab_program.m
#repeatedly without GUI
loopindices="1 2 3 4 5"
for loopind in $loopindices
do
echo running matlab $loopind
matlab -nodesktop <
matlab_program
$loopind
EOF1
echo finished running matlab $loopind
done
==================
where matlab_program is another matlab code (matlab_program.m) which can run
in matlab command line prompt and it takes an ... 阅读全帖 |
|
l*******G 发帖数: 1191 | 2 I run matlab in linux with a batch like this:
===matlab_batch.sh===============
#!/bin/bash
#this is my bash program to run matlab code matlab_program.m
#repeatedly without GUI
loopindices="1 2 3 4 5"
for loopind in $loopindices
do
echo running matlab $loopind
matlab -nodesktop <
matlab_program
$loopind
EOF1
echo finished running matlab $loopind
done
==================
where matlab_program is another matlab code (matlab_program.m) which can run
in matlab command line prompt and it takes an ... 阅读全帖 |
|
r****y 发帖数: 1437 | 3
If no graphics is needed, you can always run Matlab in unix background,
and let output redirect to a file, just let you run Fortran or C. I am
surprised that folks say that they must start matlab and leave terminal on
in order to run a matlab script.
All you need to do is just
env LM_LICENSE_FILE******************* <
***
***
***
EOF1
A simple trick widely used under Unix.
|
|
r****y 发帖数: 1437 | 4 看来很多人都不知道怎么回来运行matlab啊。
假设一个程序运行中你要输入的有如下的参数
1
(enter key)
(enter key)
Run a unix script like this
#!/bin/csh -f
setenv LM_LICENSE = (your license file) << EOF1
your_matlab_script_name
1
EOF1
That's it. It's running in background without need of your inputs. |
|