Add simulink project

This commit is contained in:
2020-01-22 15:32:32 +01:00
parent 45471fc497
commit c0de940434
11 changed files with 136 additions and 15 deletions

5
src/project_shutdown.m Normal file
View File

@@ -0,0 +1,5 @@
% When the project closes, it runs the =project_shutdown.m= script defined below.
Simulink.fileGenControl('reset');

18
src/project_startup.m Normal file
View File

@@ -0,0 +1,18 @@
% 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');