Add projectstartup and shutdown scripts

This commit is contained in:
Thomas Dehaeze 2018-10-16 13:25:05 +02:00
parent 14259c7e67
commit f3b937b3f9
4 changed files with 17 additions and 6 deletions

View File

@ -1,2 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info Type="StartUp" Visible="0" Icon="" File="config.m" Name="config" />

View File

@ -1,4 +0,0 @@
%%
freqs = logspace(-1, 3, 1000);
save_fig = false;
save('./mat/config.mat', 'freqs', 'save_fig');

1
project_shutdown.m Normal file
View File

@ -0,0 +1 @@
Simulink.fileGenControl('reset');

16
project_startup.m Normal file
View File

@ -0,0 +1,16 @@
%%
freqs = logspace(-1, 3, 1000);
save_fig = false;
save('./mat/config.mat', 'freqs', 'save_fig');
%%
project = simulinkproject;
projectRoot = project.RootFolder;
myCacheFolder = fullfile(projectRoot, '.SimulinkCache');
myCodeFolder = fullfile(projectRoot, '.SimulinkCode');
Simulink.fileGenControl('set',...
'CacheFolder', myCacheFolder,...
'CodeGenFolder', myCodeFolder,...
'createDir', true);