资源简介
使用matlab mobile等与matlab 2011a及以上连接的工具。
使用时解压该文件,执行matlab的cd命令到解压文件夹,运行install_connector来安装,执行connector on,第一次使用输入5个字符以上的连接密码即可。
代码片段和文件信息
function install_connector()
%INSTALL_CONNECTOR Install the MATLAB Connector.
% INSTALL_CONNECTOR Install the files for the MATLAB Connector into your MATLAB installation.
% Copyright 2010-2011 The MathWorks Inc.
% turn off connector if running
try
com.mathworks.util.ClassLoaderBridge.findClass(‘com.mathworks.matlabserver.embeddedwebserver.JettyWebServer‘);
running = com.mathworks.matlabserver.embeddedwebserver.JettyWebServer.isRunning();
if running
connector(‘off‘);
clear(‘java‘);
end
catch e %#ok
end
% Determine location of this file
currentFile = mfilename(‘fullpath‘);
[currentDir currentscriptName] = fileparts(currentFile);
% Define variables used in the script
productName = ‘MATLAB Connector‘;
licenseAgreementFile = fullfile(currentDir ‘MATLAB_Connector_SLA.txt‘);
zip_file = ‘MATLABconnector.zip‘;
toolboxStr = ‘toolbox‘;
connectorStr = ‘connector‘;
connectorRoot = fullfile(matlabroot toolboxStr connectorStr);
connectorHelpFile = fullfile(connectorRoot connectorStr ‘html‘ ‘bsjg133.html‘);
helpFileStr = strcat(‘file:///‘ connectorHelpFile);
% make sure user is using at least MATLAB R2009b
if verLessThan(‘matlab‘ ‘7.9‘)
error(‘%s does not run on MATLAB versions earlier than R2009b.‘ productName);
end
% check if the jvm is available
if (~usejava(‘jvm‘))
error(‘%s requires Java to run.‘ currentscriptName)
end
% check if archive exists
if (exist(zip_file ‘file‘) ~= 2)
error(‘Archive %s does not exist.\nInstallation failed.‘ zip_file)
end
% Display License Agreement
if (exist(licenseAgreementFile ‘file‘) ~= 2)
error(‘The %s license agreement file does not exist on your machine.\nThis is an invalid installation.‘ productName)
end
type(licenseAgreementFile)
reply = input(‘Do you accept this license agreement? Y/N [N]: ‘ ‘s‘);
msg = sprintf(‘You must accept the license agreement if you wish to continue installing. \n...Exiting the %s Installation.‘ productName);
if(isempty(regexpi(reply‘^(y|yes)$‘)))
disp(msg)
return
end
doinstall
install_connector_path_update(false);
rehash toolboxcache
% Wrap-up
msg = sprintf(‘\nInstallation of %s is complete.\n‘ productName);
disp(msg)
msg = sprintf(‘To start the connector type \“connector on\“.‘);
disp(msg)
msg = sprintf(‘\nFor more information see the Setup and User‘‘s Guide.‘ helpFileStr);
disp(msg)
end
function doinstall
productName = ‘MATLAB Connector‘;
% check if the user can write to matlabroot
tempFileInMLRoot = tempname(matlabroot);
fid = fopen(tempFileInMLRoot ‘w‘);
if (fid == -1)
failed = true;
if ispc
try
proc = System.Diagnostics.Process;
% EXE to run
proc.StartInfo.FileName = fullfile(matlabroot‘bin‘‘matlab‘);
% Arguments to the EXE
proc.StartInfo.Arguments = ‘/wait /noslpash /nodesktop /r install_connector_helperexit‘;
% Run-as admin
proc.Star
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4370919 2011-01-28 10:29 MATLABconnector.zip
文件 1030 2011-01-28 10:27 install_connector_path_update.m
文件 4001 2011-01-28 10:27 install_connector.m
文件 1129 2011-01-28 10:27 install_connector_helper.m
文件 7741 2011-01-28 10:27 MATLAB_Connector_SLA.txt
相关资源
- cplex 12.4 MATLAB工具箱
- 高斯模糊图像的盲复原
- 精通MATLAB数字图像处理2015的源代码
- 精通Matlab图形绘制
- 扩频通信系统的MATLAB仿真
- 一个通信抗干扰仿真MATLAB代码
- bayes分类器完整版代码
- 数字与图像处理matlab课程设计
- Matlab科学计算与可视化仿真宝典-源码
- Introduction to MATLAB
- MATLAB精彩编程100例
- MATLAB SIFT 代码
- matlab 2014b_x64 破解 mcc真正可用
- 5G Development with MATLAB
- 04-图像复原MATLAB
- 点云的三维重建代码,内容丰富matl
- matlab自动代码生成
- 《MATLAB高效编程技巧与应用的25个案例
- MATLAB模拟的电磁学数值技术
- 视频镜头分割及关键帧提取MATLAB
- 小波变换法图像融合MATLAB代码
- petri net matlab simulation
- SVM-KM Matlab源程序
- Matlab 气象图绘制
- 通信原理MATLAB仿真教程电子教案
- 基于相位谱视觉注意机制matlab代码
- matlab实用中文手册带书签
- 16QAM调制与解调仿真代码
- sift特征的Matlab提取
- RBM代码实现MATLAB
评论
共有 条评论