matlab编程3—添加工具箱 - webdancer's Blog

matlab编程3—添加工具箱

webdancer posted @ 2012年4月20日 02:14 in 编程语言 with tags matlab , 13961 阅读

在matlab程序设计中,如果我们要引入别人的写好的工具箱,怎么做呢?

首先,介绍一下matlab中的两个概念:current directory 和 search directory。matlab中的文件操作将这两个文件夹作为引用点,所以我们的文件必须在这两个之一。

1.current directory

current directory在matlab的GUI的matlab toolbars中默认显示,我们很容易更改current directory.如下图:

2.search directory

安装工具箱,就是将工具箱路径,添加到search directory中。

有两种方式:

  1. 命令行。addpath(genpath('/path/to/targettoolbox'))
  2. 通过GUI界面。选择File-->setpath添加。

注意:matlab中,搜索目录中的函数在统一命名空间,这样如果函数重名,是一个比较让人不好办的问题。如果自己写的函数,不要与matlab内置函数重名;如果第三方toolboxs有重名现象,只好改名了。

UK Board Question Pa 说:
2022年9月16日 21:39

Uttarakhand Board of School Education (UBSE) have introduced the Secondary Education Level 8th Standard Subject wide Sample Paper suggestions with Answers for all Languages & subject of High School Level Class 8th Standard Students to know the new exam scheme or question pattern of Term1 & Term2 exams. UK Board Question Paper Class 8 Every year there are huge number of private school teaching staff and others have designed and suggested UK Board 8th Class Model Paper 2023 with Answer Solutions to practice with regular Mock Test to score top marks in all exams of UBSE. Advised to contact your class teacher to get most important questions of the lesson for all chapters of the course.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee