Code covered by the BSD License  

Highlights from
NXT-LTD: Line Tracking Dancing Robot Demo

NXT-LTD: Line Tracking Dancing Robot Demo

by

 

23 May 2013 (Updated )

Modeling Logic for Robot Control with Simulink and Stateflow

clean_up_project()
function clean_up_project()
% Clean up the environment for the current project. This function should
% undo the settings applied in "set_up_project". It should be set to
% "Run at Shutdown".

% Date   : Jan 17, 2013
% Copyright 2013 The MathWorks, Inc.    

% Use Simulink Project API to get the current project:
p = simulinkproject;

% Get the project root folder:
projectRoot = p.RootFolder;

% Remove paths added for this project. Get the single definition of the
% folders to add to the path:
folders = project_paths();

% Remove these from the MATLAB path:
for jj=1:numel(folders)
    rmpath( fullfile(projectRoot, folders{jj}) );
end

% Reset the location where generated code and other temporary files are
% created (slprj) to the default:
Simulink.fileGenControl('reset');

% Close Simulink models
bdclose all
clear mex
%Delete the cache folder so we can start fresh next time
myCacheFolder = fullfile(projectRoot, 'generatedCode');
if exist(myCacheFolder,'dir')
    rmdir(myCacheFolder,'s');
end
% Clear workspace
cd(projectRoot)
clear
clc

Contact us