Matsim

Matlab/Simulink interface. Easily create Simulink models from a Matlab script.

https://github.com/gave92/Matsim

您现在正在关注此提交

Matsim is a high level interface to create Simulink models from a Matlab script. Matsim is a wrapper around the standard simulink API that makes building a simulink model programmatically much faster.

Convert function handle to simulink model:
h = @(x,y) 1-x+min(0,y);
fun2model(h);

Build simulink model from script:
import matsim.library.*
sys = simulation.load('my_model'); % Create and open a model named 'my_model'
sys.show();
a = FromWorkspace('var1'); % Create FromWorkspace block
b = FromWorkspace('var2');
res = Min(a,b); % Create MinMax block with block "a" and block "b" as inputs
s = Scope(res); % Create scope block
sys.layout() % Connect and layout model

Key features:
- Automatic layout (no need to specify block positions!)
- Intuitive interface (you can "add","subtract","multiply",... simulink blocks)
- Extensible library (easily add new blocks from your custom libraries)

For installation instruction and detailed examples see:
https://github.com/gave92/Matsim/blob/master/README.md

引用格式

Marco Gavelli (2026). Matsim (https://github.com/gave92/Matsim), GitHub. 检索时间: .

类别

Help CenterMATLAB Answers 中查找有关 Modeling 的更多信息

MATLAB 版本兼容性

  • 与 R2011b 及更高版本兼容

平台兼容性

  • Windows
  • macOS
  • Linux

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明 Action
1.0.4

- Improved layout for multi-outport blocks
- Added support for new blocks (BusCreator, Lookup1D, SwitchCase, ....)
- Updated example

1.0.3

Fixed missing getversion() function error.
Improved fun2model() function.

1.0.2.8

updated readme

1.0.2.7

Added function handle to sumlink conversion

1.0.2.6

New logo and docs

1.0.2.5

Improved description

1.0.2.4

Updated documentation

1.0.2.3

Updated description

1.0.2.2

Updated summary

1.0.2.1

Added cover figure

1.0.2

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 存储库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 存储库