What Is the MATLAB Search Path
The search path, or path is a subset of all the folders in the file system. MATLAB® software uses the search path to efficiently locate files used with MathWorks® products. MATLAB can access all files in the folders on the search path.
How MATLAB Stores the Search Path

MATLAB saves the search path information in the pathdef.m file. The pathdef.m file is a series of full path names, one for each folder on the search path, separated by a semicolon (;).
By default, pathdef.m is in $matlabroot/toolbox/local.

改变上下文中的search path:

Syntax:
path
path('newpath')
path(path,'newpath')
path('newpath',path)
p = path
Description
path displays the MATLAB® search path, which is stored in pathdef.m.
path('newpath')      changes the search path to newpath, where newpath is a string array of folders.
path(path,'newpath')   adds the newpath folder to the end of the search path. If newpath is already on the search path, thenpath(path, 'newpath') moves newpath to the end of the search path.
path('newpath',path)   adds the newpath folder to the top of the search path. If newpath is already on the search path, thenpath('newpath', path) moves newpath to the top of the search path. To add multiple folders in one statement, instead use addpath.
p = path          returns the search path to string variable p.
例子:
path('/opt/lampp/lib', path), 即是把/opt/lampp/lib加入到search path的前面。
 

Specifying the Java Library Path

Java classes can dynamically load native methods using the Java method java.lang.System.loadLibrary("LibFile"). In order for the JVM software to locate the specified library file, the directory containing it must be on the Java Library Path. This path is established when MATLAB launches the JVM software at startup, and is based on the contents of the file
$matlabroot/toolbox/local/librarypath.txt
(where $matlabroot is the MATLAB root directory represented by the MATLAB keyword matlabroot).
You can augment the search path for native method libraries by editing the librarypath.txt file. Follow these guidelines when editing this file:
    Specify each new directory on a line by itself.
    Specify only the directory names, not the names of the DLL files. The LoadLibrary call does this for you.
To simplify the specification of directories in cross-platform environments, you can use any of these macros: $matlabroot, $arch, and $jre_home.

=================================================================================
改变matlab的 load library path: 

第一种方法:改变library load path:
export LD_LIBRARY_PATH=/opt/lampp/lib
若采用这种方法,需要建立一个可执行文件 /usr/local/bin/matlab,内容为:

#!/bin/bash
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/lampp/lib
cd /opt/soft/matlab
# 这里不能采用后台执行的方式,不然matlab 不能启动, 也即不能加 &
./bin/matlab
 

第二种方法:还有另外一种方法在编程上下文定义load library path:(这个方法好像不管用)
getenv('LD_LIBRARY_PATH')
setenv('LD_LIBRARY_PATH', [getenv('LD_LIBRARY_PATH') ':/opt/lampp/lib']);

matlab search path的更多相关文章

  1. Difference Search Path

    1.Framework Search Path           where to search frameworks (.framework bundles) in addition to sys ...

  2. Linux 中C/C++ search path(头文件搜索路径)

    https://blog.csdn.net/BjarneCpp/article/details/76135980 起因 我拿到了一套Linux下的C++代码,代码中有这个头文件#include < ...

  3. Package libvirt was not found in the pkg-config search path

    关于pip安装libvirt-python的时候提示Package libvirt was not found in the pkg-config search path的问题解决方法 1.一开始以为 ...

  4. Package rdkafka was not found in the pkg-config search path.

    问题 在使用confluent-kafka-go 时遇到如下问题: $ go build t.go # pkg-config --cflags rdkafka Package rdkafka was ...

  5. Ubuntu 16.04 LTS 安装libvips出现”Package vips was not found in the pkg-config search path”

    使用libvips来操作图像,libvips的部署参考一个Node.js工程:https://github.com/lovell/sharp 在MAC下安装很顺利,到Linux环境下(Ubuntu 1 ...

  6. MATLAB Toolbox Path Cache is out of date and is not being used的解决

    作者:朱金灿 来源:http://blog.csdn.net/clever101 使用mcc编译MATLAB\R2009a\extern\examples\compiler目录下的hello.m,编译 ...

  7. Environment error: “CodeBloks can't find compiler executable in your configured search path's for GNU GCC compiler”

    codeblock安装后,提示cant find compiler executable in your configured search paths for GNU GCC Compiler 可能 ...

  8. 解决Visual C++ for Linux: -L"~/projects/path_to_lib_folder" 无法设置library search path的问题

    最近倒腾Linux C/C++项目.以目前的情况来说,要生成编译(build)一个Linux工程脚本,首选的工具必定是CMake.这也是我之前Linux项目的首选.不过自从VS IDE支持Linux ...

  9. Package gtk+-3.0 was not found in the pkg-config search path

    问题描述: 在fedora21系统上通过rpmbuild构建fcitx的二进制包时出现以上错误,经老程序员指点:“是相应的开发包没有安装” 解决办法: yum installl gtk3-devel  ...

随机推荐

  1. java 日期格式转换EEE MMM dd HH:mm:ss z yyyy

    SimpleDateFormat parserSDF = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzzz yyyy", Locale. ...

  2. spring cloud config 入门

    简介 Spring cloud config 分为两部分 server client config-server 配置服务端,服务管理配置信息 config-client 客户端,客户端调用serve ...

  3. openfire的配置

    Openfire 采用Java开发,开源的实时协作(RTC)服务器基于XMPP(Jabber)协议.Openfire安装和使用都非常简单,并利用Web进行管理.单台服务器可支持上万并发用户.所以常常被 ...

  4. 转:表单中Readonly和Disabled的区别(HTML中使用javascript解除禁止input输入框代)

    转:表单中Readonly和Disabled的区别 参考资料: disabled和readonly区别: 参考博文1地址:http://blog.csdn.net/symgdwyh/article/d ...

  5. ADODB.Connection 错误 '800a0e7a' 未找到提供程序。该程序可能未正确安装。解决方法!

    [问题描述]调试基于ACCESS+ASP的网站程序的时候,遇到如下错误: ADODB.Connection 错误 '800a0e7a' 未找到提供程序.该程序可能未正确安装. /Inc/Functio ...

  6. HDU 3336 (KMP next性质) Count the string

    直接上传送门好了,我觉得他分析得非常透彻. http://972169909-qq-com.iteye.com/blog/1114968 #include <cstdio> #includ ...

  7. LA 2218 (半平面交) Triathlon

    题意: 有n个选手,铁人三项有连续的三段,对于每段场地选手i分别以vi, ui 和 wi匀速通过. 对于每个选手,问能否通过调整每种赛道的长度使得他成为冠军(不能并列). 分析: 粗一看,这不像一道计 ...

  8. android开发中eclipse里xml开发的自动提示和使用帮助快捷键提示

    Eclipse Android 代码自动提示功能 Eclipse for android 设置代码提示功能 打 开 Eclipse 依次选择 Window > Preferences > ...

  9. 英文 数字 不换行 撑破div容器

    我们在div等容器 中,如果规定了宽度,并且里面的内容不是全英文或者全数字是OK的,会自动换行,但是如果是全数字或者是全英文,则会撑破容器,如图     解决方法 word-wrap:break-wo ...

  10. UVA 10537 The Toll! Revisited 过路费(最短路,经典变形)

    题意:给一个无向图,要从起点s运送一批货物到达终点e,每个点代表城镇/乡村,经过城镇需要留下(num+19)/20的货物,而经过乡村只需要1货物即可.现在如果要让p货物到达e,那么从起点出发最少要准备 ...