www.gusucode.com > slcidemos工具箱matlab源码程序 > slcidemos/slcidemodir.m

    function [tempDir, cgDir] = slcidemodir()
% SLCIDEMODIR - Create and change to a temporary working directory.
%
%   [TEMPDIR, CGDIR] = SLCIDEMODIR()
%
%   TEMPDIR - full path to the temporary directory
%   CGDIR   - full path to the code generation directory
%
% TEMPDIR and CGDIR are the same directory when Simulink preference
% 'File generation control' is not set.
%
% Example usage:
%   >> currentDir = pwd;  % Save location of current working directory
%   >> [tmpdir, cgdir] = slcidemodir(); % Create and move to temp directory
%   >> cd(currentDir) % Return to previous working directory
  
% Copyright 1994-2011 The MathWorks, Inc.

[tempDir, cgDir] = coderdemodir('slcidemo');