در کد زیر می تونید ببینید چطور matlab و SAP2000  با هم لینک شدن:

Example

  1. Create a folder named “C:\API” if it does not exist.
  2. Create a MATLAB .m file using the built-in or any text editor and paste in the following code:
%% clean-up the workspace & command window
clear;
clc;

%% pass data to Sap2000 as one-dimensional arrays
feature('COM_SafeArraySingleDim', 1);

...بقیه در ادامه مطلب...

منبع :  civilmax.blogfa.com