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. 转:Servlet的url匹配以及url-pattern详解

    Servlet是J2EE开发中常用的技术,使用方便,配置简单,老少皆宜.估计大多数朋友都是直接配置用,也没有关心过具体的细节,今天遇到一个问题,上网查了servlet的规范才发现,servlet中的u ...

  2. iOS处理XMl提供GDataXMLNode下载的链接

    GDataXMLNode .好东西,处理xml 在iOS 中使用.可以编辑和读取Xml文档.支持Xpath.这个很好. GDataXMLNode.h GDataXMLNode.m 文件很不好找啊. / ...

  3. Linux文件与进程的Capability简介

    UID这种权限机制颗粒太粗,容易引起权利过剩(溢出),Linux引入了Capability:每个Capability系统内以一位Bit代表,OS内部使用64bit存储. 下面是android的capa ...

  4. 面试题_31_to_47_JVM 底层与GC(Garbage Collection)的面试问题

    31)64 位 JVM 中,int 的长度是多数?Java 中,int 类型变量的长度是一个固定值,与平台无关,都是 32 位.意思就是说,在 32 位 和 64 位 的Java 虚拟机中,int 类 ...

  5. 在Windows下通过命令行或者.bat文件统计一个目录中文件数量

    在Windows下面怎样通过命令行统计一个目录中文件的数量,或者说,如果在一个.bat文件中,统计一个目录中的文件数量? 我原来以为是不可能的,要编一个vbs程序什么的,后来到网上找了下,发现还真是可 ...

  6. uva12230Crossing Rivers

    数学期望. 过每条河的时间的可能在[L/v,3*L/v]间均匀分布,数学期望为2*L/v. 然后在加上在陆上走的时间. #include<cstdio> #include<algor ...

  7. Ajax的“dataType”乱用的陷阱

    $.doAjax({ url : "areaAction_synchronizeArea.do", data : { 'vrvRangeUrl' : synAreaHTTP ,'v ...

  8. BZOJ 2194 快速傅里叶之二

    fft. #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> ...

  9. [反汇编练习] 160个CrackMe之015

    [反汇编练习] 160个CrackMe之015. 本系列文章的目的是从一个没有任何经验的新手的角度(其实就是我自己),一步步尝试将160个CrackMe全部破解,如果可以,通过任何方式写出一个类似于注 ...

  10. 如何用css3实现风车效果

    前面讲过css3可以替代很多js实现的效果,其实很多时候纯css3甚至可以替代图片,直接用css3就可以画出一些简单的图片.虽然css3画出来的图片效果可能不如直接用图片的好,实现起来也比较复杂,最麻 ...