qc_get_default_model_log qc_get_default_model_uri navigation bar

Table of Contents

qc_set_default_model_log

Sets the default filename for model logging.

Syntax

qc_set_default_model_log(filename) % set default filename for models' log files
    

Description

Sets the default filename for model logs to filename. If filename is the empty string then automatic logging is turned off for all models, except those that override the default setting.

The following format specifiers are replaced in the log filename with the appropriate values when the filename is used:

Format Specifier

Description

%d

the current Matlab directory in quotes e.g. "C:\Documents and Settings\myname\My Documents\MATLAB"

%D

the current Matlab directory using short filenames (PC) or escaped spaces (UNIX) e.g. "C:\Docume~1\myname\MyDocu~1\MATLAB" (requires Simulink Coder)

%m

the model name e.g. mymodel

%q

replaced with a double quote (since MATLAB does not accept double quote characters)

%t

the target type for the given model or configuration set (e.g. windows, qnx_x86, etc.)

%(var)

the value of environment variable 'var' (on the host!) e.g. %(HOME)

%{expr}

the value of a MATLAB expression as a string. For example:

%{date}

date that model started

%{time}

time that model started

%{instance(3)}

three digit instance number

The default filename for model logs may be retrieved using the qc_get_default_model_log command.

Parameters

filename

A string containing the new default log filename e.g.'%m_%{time}.log'

Outputs

This function has no outputs.

Examples

qc_set_default_model_log('%{date}/%m_{time}.log'); % Sets default log filename to '%{date}/%m_{time}.log'.
    

See Also

 

navigation bar