From f3b937b3f9f3d31acdd7ab0ce0ed646acb79f3e7 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Tue, 16 Oct 2018 13:25:05 +0200 Subject: [PATCH] Add projectstartup and shutdown scripts --- ...00-4444-a612-6570201cb54e.type.EntryPoint.xml | 2 -- config.m | 4 ---- project_shutdown.m | 1 + project_startup.m | 16 ++++++++++++++++ 4 files changed, 17 insertions(+), 6 deletions(-) delete mode 100644 .SimulinkProject/Root.type.EntryPoints/aae1e5cc-ac00-4444-a612-6570201cb54e.type.EntryPoint.xml delete mode 100644 config.m create mode 100644 project_shutdown.m create mode 100644 project_startup.m diff --git a/.SimulinkProject/Root.type.EntryPoints/aae1e5cc-ac00-4444-a612-6570201cb54e.type.EntryPoint.xml b/.SimulinkProject/Root.type.EntryPoints/aae1e5cc-ac00-4444-a612-6570201cb54e.type.EntryPoint.xml deleted file mode 100644 index 854d0b4..0000000 --- a/.SimulinkProject/Root.type.EntryPoints/aae1e5cc-ac00-4444-a612-6570201cb54e.type.EntryPoint.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/config.m b/config.m deleted file mode 100644 index cadb56c..0000000 --- a/config.m +++ /dev/null @@ -1,4 +0,0 @@ -%% -freqs = logspace(-1, 3, 1000); -save_fig = false; -save('./mat/config.mat', 'freqs', 'save_fig'); diff --git a/project_shutdown.m b/project_shutdown.m new file mode 100644 index 0000000..d7948f6 --- /dev/null +++ b/project_shutdown.m @@ -0,0 +1 @@ +Simulink.fileGenControl('reset'); diff --git a/project_startup.m b/project_startup.m new file mode 100644 index 0000000..276abe4 --- /dev/null +++ b/project_startup.m @@ -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);