将有限元工具箱解压到D:/Program Files/MATLAB/R2009b/toolbox里面,命名为FEM文件夹
输入以下命令:
>> addpath('D:/Program Files/MATLAB/R2009b/toolbox/FEM')
>> savepath
再测试是否安装成功
>> what FEM %显示FEM中所有文件
>> which BeamAssemble %显示其中一个文件的路径,这样就安装成功了。
常见功能
which + 函数名——查找该函数的位置,例如
>> which SpringElementStiffness
D:/Program Files/MATLAB/R2009b/toolbox/fem/SpringElementStiffness.m
lookfor +函数名——查找该函数的第一个注释,例如
>> lookfor SpringElementStiffness
SpringElementStiffness - This function returns the element stiffness
help +函数名——查找该函数的用处,例如
>> help SpringElementStiffness
SpringElementStiffness This function returns the element stiffness
matrix for a spring with stiffness k.
The size of the element stiffness matrix
is 2 x 2.

本文介绍了如何将有限元(FEM)工具箱安装到MATLAB R2009b中,通过添加路径、保存路径以及测试命令确认安装成功。同时,展示了使用'which'、'lookfor'和'help'命令来查找和了解FEM工具箱中的函数,如SpringElementStiffness。
最低0.47元/天 解锁文章
612





