OpenSees API for MATLAB
Quick start guide:
- Add OpenSees API folder to your MATLAB path. For example,
addpath ../OSAPI/
- Create a database object. For example,
db = database('MyModel', 'MyName', 'MyTCLFile')
- Add nodes, materials, elements, etc. to the database object. For example,
db.addNode( MyNode )
db.addElement( MyElement )
- Compile the database into a script using the
write
method. Note that this does not create the TCL file.
db.write;
- Execute the script using
exec
. You need to make sure that OpenSees is on either MATLAB's path or your system's path. Specify your version of OpenSees as eitherreg
for regular,SP
for OpenSeesSP, orMP
for OpenSeesMP. For example,
exec(db, 'SP');