Matsim

version 1.0.4 (845 KB) by Marco Gavelli
Matlab/Simulink interface. Easily create Simulink models from a Matlab script.

270 Downloads

Updated 13 Jul 2020

From GitHub

View License on GitHub

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

Cite As

Marco Gavelli (2022). Matsim (https://github.com/gave92/Matsim), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with R2011b and later releases
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.