UP | HOME

Simulink Project for the Stewart Simscape folder

A Simulink Project is used for the study of Stewart platforms using Simscape.

From the Simulink project mathworks page:

SimulinkĀ® and Simulink Projects provide a collaborative, scalable environment that enables teams to manage their files and data in one place.

With Simulink Projects, you can:

The project can be opened using the simulinkproject function:

simulinkproject('../');

When the project opens, a startup script is ran. The startup script is defined below and is exported to the project_startup.m script.

project = simulinkproject;
projectRoot = project.RootFolder;

myCacheFolder = fullfile(projectRoot, '.SimulinkCache');
myCodeFolder = fullfile(projectRoot, '.SimulinkCode');

Simulink.fileGenControl('set',...
                        'CacheFolder', myCacheFolder,...
                        'CodeGenFolder', myCodeFolder,...
                        'createDir', true);

%% Load the Simscape Configuration
load('mat/conf_simscape.mat');

When the project closes, it runs the project_shutdown.m script defined below.

Simulink.fileGenControl('reset');

The project also permits to automatically add defined folder to the path when the project is opened.

Author: Dehaeze Thomas

Created: 2021-01-08 ven. 15:52