下面我将以工具箱 dfield8 和 pplane8 为例介绍如何将工具箱添加到 Matlab 的Toolbox
下载工具箱首先到 MathWorks 下载两个工具包 dfield8 和 Pplane
下载需要登陆账户,忘记密码就赶紧改一下吧 [Doge]
解压并拷贝下载完成之后解压,然后将文件夹拷贝到 Matlab 的 toolbox 目录下。这里我的路径是 D:\Program Files\MATLAB\R2021b\toolbox
设置路径打开Matlab,点击 File->Set Path->Add Folder,或者(中文版)直接在工具栏 环境 下选择 设置路径
添加刚才解压拷贝的文件夹。切记如果你要添加的文件夹里面还有子文件夹,一定要点击 Add with Subfolders,选择刚才文件夹,添加该文件夹的所有子文件夹。点击保存之后关闭。
更新工具箱路径缓存在 File->Preferences->General 里面,选择 update Toolbox Path Cache。或者(中文版)工具栏 环境 下选择 预设
选择 常规 并 更新工具箱路径缓存
测试最后我们通过 Matlab 命令行测试是否添加成功。
12>> which dfield8D:\Program Files\MATLAB\R2021b\toolbox\dfield8.m\dfield8.m
或者
12345678910111213141516171819>> help pplane8 pplane8 is an interactive tool for studying planar autonomous systems of differential equations. When pplane8 is executed, a pplane8 Setup window is opened. The user may enter the differential equation and specify a display window using the interactive controls in the Setup window. Up to 4 parameters may also be specified. In addition the user is give a choice of the type of field displayed and the number of field points. When the Proceed button is pressed on the Setup window, the pplane8 Display window is opened, and a field of the type requested is displayed for the system. When the mouse button is depressed in the pplane8 Display window, the solution to the system with that initial condition is calculated and plotted. Other options are available in the menus. These are fairly self explanatory. This is the latest version that will run on MATLAB 9.0xxxxxxxxxx19 1D:\Program Files\MATLAB\R2021b\toolbox\dfield8.m\dfield8.m>> help pplane82 pplane8 is an interactive tool for studying planar autonomous systems of3 differential equations. When pplane8 is executed, a pplane8 Setup4 window is opened. The user may enter the differential5 equation and specify a display window using the interactive6 controls in the Setup window. Up to 4 parameters may also be 7 specified. In addition the user is give a choice of the type of 8 field displayed and the number of field points.9 10 When the Proceed button is pressed on the Setup window, the pplane811 Display window is opened, and a field of the type requested is 12 displayed for the system. When the mouse button is depressed in 13 the pplane8 Display window, the solution to the system with that14 initial condition is calculated and plotted.15 16 Other options are available in the menus. These are17 fairly self explanatory. 18 19 This is the latest version that will run on MATLAB 9.0
如果可以显示就算搞定了