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. $.toJSON的用法或把数组转换成json类型

    1. html页面全部代码 <html> <head>     <title></title> <script src="../../S ...

  2. 百度地图api经纬度气死我了!

      百度地图api经纬度气死我了! 百度地图官网api中例子的经纬度.我测试了2天才好用.一直是不能用.坑死我了.原来是获取的经纬度.和实际调用的经纬度尽然是反的.调转过来就好用了.气死我了.弄了两天 ...

  3. 如何使用UIAutomation进行iOS 自动化测试(Part I)

    转自:http://www.cnblogs.com/vowei/archive/2012/08/10/2631949.html 写在前面 研究iOS的自动化测试也有些日子了,刚开始的时候,一直苦于找不 ...

  4. HDU 3467 (求五个圆相交面积) Song of the Siren

    还没开始写题解我就已经内牛满面了,从晚饭搞到现在,WA得我都快哭了呢 题意: 在DotA中,你现在1V5,但是你的英雄有一个半径为r的眩晕技能,已知敌方五个英雄的坐标,问能否将该技能投放到一个合适的位 ...

  5. BZOJ_1052_[HAOI2007]_覆盖问题_(二分+贪心)

    描述 http://www.lydsy.com/JudgeOnline/problem.php?id=1052 网格图,给出\(n\)个点,要求用3个边长相同的正方形覆盖所有点,求最小边长. 分析 显 ...

  6. 用Java Servlets代替CGI

    从网络的早期阶段开始,人们就希望他们的网络服务器不仅能够显示静态文档,通用网关接口(CGI) 扩展了服务器的能力,但其代价是增加了额外的处理进程.FastCGI则把外部CGI 处理进程同网络服务器更紧 ...

  7. objective-c里的方法指针IMP的用法

    SGPopSelectView.h @interface SGPopSelectView : UIView @property (nonatomic, assign) SEL selector; @p ...

  8. 【转】IOS 计时器 NSTimer

    原文网址:http://blog.csdn.net/tangshoulin/article/details/7644124 1.初始化 + (NSTimer *)timerWithTimeInterv ...

  9. 【转】./a.out 2>&1 > outfile

    原文网址:http://www.cnblogs.com/zhaoyl/archive/2012/10/22/2733418.html APUE 3.5关于重定向有个容易迷惑人的问题: ./a.out ...

  10. HTTP请求中浏览器缓存

    本文导读:浏览器缓存机制,其实主要就是HTTP协议定义的缓存机制.客户端缓存是否需要是可以在服务端代码上控制的.那就是响应头.响应头告诉缓存器不要保留缓存,缓存器就不会缓存相应内容:如果请求信息是需要 ...