mount -o loop [path][filename].iso /media/matlab
破解install.jar替换matlab2014/java/jar/install.jar;
1.拷贝破解license_405329_R2014a.lic 到制定目录 /usr/local/etc/license_405329_R2014a.lic
2.
sudo ./install -destinationFolder /usr/local/matlab2014 -fileInstallationKey 12345-67890-12345-67890 -agreeToLicense yes -outputFile /tmp/mathworks_localhost.log -mode silent -activationPropertiesFile /usr/local/etc/license_405329_R2014a.lic
sudo ./install -destinationFolder /usr/local/matlab2014 -fileInstallationKey 12345-67890-12345-67890 -agreeToLicense yes -outputFile /tmp/mathworks_localhost.log -mode silent -activationPropertiesFile /root/welen/DetectV/tools/license_405329_R2014a.lic
3.从安装包中找到libmwservices.so,找到你本地安装Matlab的路径 /usr/local/matlab2014
也可以installer_input.txt为模版,安装
也可以uninstaller_input.txt为模板,卸载
./matlab -c /yourpath/matlab2012b/serial/matlab2012b_std.dat -nodisplay
4.最后将matlab添加到.bashrc 文件中,就可以在任意位置启动matlab:
gvim /root/.bashrc
export PATH=/usr/local/matlab2014/bin:$PATH
alias matlab2014=\'matlab -c /usr/local/etc/license_405329_R2014a.lic -nodisplay\'
source /root/.bashrc
1.加载文件夹
addpath(\'dir\') %加载单个文件夹
addpath(\'dir1\',\'dir2\') %加载多个文件夹
addpath(genpath(\'dir\'))%回溯性加载本文件夹及其子文件夹
2.执行文件
-nodesktop 启动jvm(Jave Virtual Machine),不启动desktop,但help 界面,preferences界面等仍可通过cmdline 调出,即jvm启动但不启动desktop,可以启动其他显示
-nodisplay 启动jvm,不启动desktop,不启动任何显示相关,忽略任何DISPLAY 环境变量;即jvm启动但不能显示
-nojvm 不启动jvm,则与之相关的一切活动将无法进行,包括图形界面显示
-nosplash 只是不显示启动时的log画面,jvm,desktop等正常启动
nohup 运行速度太慢
matlab -c /usr/local/etc/license_405329_R2014a.lic -nojvm <run.m> fill.out
处理的文件 run.m, 屏幕上输出的结果fill.out
或者
matlab -c /usr/local/etc/license_405329_R2014a.lic -nojvm -r run fill.out
matlab -c /usr/local/etc/license_405329_R2014a.lic -nojvm -r run
在matlab字符环境中执行run.m命令: run test
nohup matlab -c /usr/local/etc/license_405329_R2014a.lic -nodisplay < test.m 1>running.log 2>running.err & 挺快,推荐
nohup matlab -c /usr/local/etc/license_405329_R2014a.lic -nodisplay < test.m 1>running.log 2>running.err &
matlab2014a 支持4.7以下, 换gcc
ln -s /home/welen/data/backup/20150126/gcc /usr/bin/gcc
ln -s /home/welen/data/backup/20150126/g++ /usr/bin/g++
有时会报license错误,指定目录
独立运行的程序可能依赖动态库
/usr/local/matlab2014/bin/glnxa64/
/usr/local/matlab2014/runtime/glnxa64
export LD_LIBRARY_PATH=/usr/local/matlab2014/bin/glnxa64:/usr/local/matlab2014/runtime/glnxa64
旧库会报错 GLIBCXX_3.4.15\' not found (现在gcc4.8 和gcc4.4 都存在)
addpath(genpath(\'/home/welen/matlab/test/FEA/MIRtoolbox1.6.1\'))
mcc -mv -o MakeFeature Features.m MakeFeatureSet.m
Features(\'/home/welen/matlab/test/FEA/netlab3_3/testcode\',\'/home/welen/matlab/test/FEA/netlab3_3/outcode\');
不加载某些库 simulink
f = dir(fullfile(matlabroot, \'toolbox\', \'simulink\')); %保留
for i=1:length(f)
rmpath(fullfile(matlabroot, \'toolbox\', \'simulink\', f(i).name));
end
ldd,程序依赖dll
export LD_LIBRARY_PATH=/usr/local/matlab2014/bin/glnxa64:/usr/local/matlab2014/runtime/glnxa64
./MakeFeature \'/home/welen/matlab/test/FEA/netlab3_3/testcode\' \'/home/welen/matlab/test/FEA/netlab3_3/outcode\'
java -jar Recognizer.jar -t C:\Users\Administrator\Desktop\DectctV\test.arff -f C:\Users\Administrator\Desktop\DectctV\filelist.txt -o C:\Users\Administrator\Desktop\DectctV\output.txt
java Recognizer -i C:\Users\Administrator\Desktop\DectctV -t C:\Users\Administrator\Desktop\DectctV\test.arff -f C:\Users\Administrator\Desktop\DectctV\filelist.txt -o C:\Users\Administrator\Desktop\DectctV\output.txt
java -classpath /home/welen/matlab/test/FEA/netlab3_3/outcode/Recognizer.jar Recognizer -i /home/welen/matlab/test/FEA/netlab3_3/outcode -t test.arff -f filelist.txt -o output.txt
C:\Users\Administrator\Desktop\DectctV\data.arff
C:\Users\Administrator\Desktop\DectctV\filelist.txt
C:\Users\Administrator\Desktop\DectctV\output.txt
C:\Users\Administrator\wekafiles\packages\LibSVM\lib\libsvm.jar
C:\Users\Administrator\wekafiles\packages\LibSVM\lib\libsvm.jar;D:\Program Files\Weka-3-7\weka.jar;F:\mp3towav\Slices\model\ANN.jar;D:\marsyas\mirex_gc_09\mirex.jar
请发表评论