htmlwriteFS is an obsolete function which will be removed in future releases. Use publishFS.m instead.
Create file FSRmdr.html starting from file FSRmdr.
NameFile='FSRmdr.m'; out=publishFS(NameFile,'ErrWrngSeeAlso',false,'evalCode',false);
Create file FSRmdr.html starting from file FSRmdr and display detailed information about the Input, Output and Optional arguments.
NameFile='FSRmdr.m'; out=publishFS(NameFile,'Display','iter-detailed','ErrWrngSeeAlso',false,'evalCode',false);
IPS
— Specific MATLAB strutcure.
Structure.A structure created with file mreadFS or modified with the GUI.
containing the following fields:
Value | Description |
---|---|
title |
title of HTML file. String. String to be included in HTML tag title |
purpose |
purpose of the routine. String. String forming second row of output HTML file |
description |
short description of the file. String If this field is not empty it is included in the HTML file at the beginning of the section "Description" |
InpArgs |
Required and Optional input arguments. Cell. Cell of size k-by-7 containing information about required and optional input argument. 1st column = name 2nd column = short description 3rd column = type indication (Scalar, matrix, ...) 4th column = string containing long description. If the input argument is a struct, columns 2 and 3 will be empty and all information about the fields of the structure will be included in the 4th column. 5th column = example (if present) 6th column = Data type 7th column = string contaning '1' if the argument is required and '0' if it is optional 8th column = this column is empty unless 3rd column contains the word structure. If this is the case the 8th column will contain a cell with two columns containing the Values/Description of the associated structure. |
OptArgs |
Optional input arguments specified as name/values pairs. Cell. Cell of size r-by-7 containing information about and optional input argument specified as name/values pairs. 1st column = name. 2nd column = short description. 3rd column = type indication (Scalar, matrix, strucutre, ...). 4th column = string containing long description. 5th column = example (if present). 6th column = Data type (ex. Single |Double). 7th column = this column is empty unless 3rd column contains the word structure. If this is the case the 7th column will contain a cell with two columns containing the Values/Description of the associated structure. |
OutArgs |
Required and Optional (varaargout) output arguments. Cell. Cell of size k-by-5 containing information about output and varargout output argument. 1st column = name. 2nd column = short description. 3rd column = type indication (Scalar, matrix, strucutre, ...). 4th column = string containing long description. 5th column = this column is empty unless output argument is a structure. If an output argument is a struct, columns 2, 3 and 4 will be empty and all information about the fields of the structure will be included in the 5th column. |
MoreAbout |
More About. String. String containing what in the HTML file will appear under the section "More About". |
Acknowledgements |
Acknowledgements. String. String containing what in the HTML file will appear under the section "Acknowledgements". |
References |
References. cell. Cell of length r containing the references. |
SeeAlso |
References. cell. Cell of length s containing the references to linked files. |
Ex |
Examples. cell. Cell of length t containing the examples. First column= title of the example; Second column = detailed description; Third column = MATLAB code; Fourth column = dummy variable which indicates whether the example must be executed or not) If 1 example is executed |
ExtraEx |
Extra Examples. cell. Cell of length u containing the u extra examples. First column= title of the example; Second column = detailed description; Third column = MATLAB code; Fourth column = dummy variable which indicates whether the example must be executed or not) If 1 example is executed |
Data Types: struct
Specify optional comma-separated pairs of Name,Value
arguments.
Name
is the argument name and Value
is the corresponding value. Name
must appear
inside single quotes (' '
).
You can specify several name and value pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
'Display','none'
, 'outputDir','C:'
, 'imagesDir','C:'
, 'evalCode','false'
, 'write2file','false'
, 'ErrWrngSeeAlso',false
Display
—Level of display.string.'off' or 'none' displays no output.
'iter' displays a series of messages on the screen about the execution of the different section of the input .m file 'iter-detailed' displays a series of messages on the screen not only about the execution of the different section of the input .m file, but also about cells containing information about the required input arguments, optional input arguments, and output arguments
Example: 'Display','none'
Data Types: string
outputDir
—Output folder.string.Output folder to which the HTML document is saved, specified as the comma-separated pair consisting of 'outputDir' and the full path. You must specify the full path as a string, for example 'C:\PublishedOutput'.
The default value, '', specifies the (FSDA root)\helpfiles\FSDA path.
Remark - outputDir must be a valid path.
Example: 'outputDir','C:'
Data Types: string
imagesDir
—Output folder of png images.string.Output folder to which the images attached to the HTML document are saved, specified as the comma-separated pair consisting of 'outputDir' and the full path. You must specify the full path as a string, for example 'C:\PublishedOutput'.
The default value, '', specifies the "(FSDA root)\helpfiles\FSDA\images" path.
Remark - if imageDir is not specified but outputDir is specified images will be save into the same folder of the HTML output file Remark - imagesDir must be a valid path.
Example: 'imagesDir','C:'
Data Types: string
evalCode
—Option to run code.logical.Option to evaluate code of the examples in the input .m files enclosed in tags "%{" "%}" whose first line starts with symbols "%%".
If evalcode is true the code associated with the examples which start with symbols '%%' will be run and the output will be automatically included into the HTML output file. The images will be save in subfolder images_help of the outputDir. The default value of evalCode is true.
Example: 'evalCode','false'
Data Types: Boolean
write2file
—Option to write HTML file.logical.Option which specifies whether HTML file must be created or if just string outstring must be created. The default value of write2file is true, that is html file is created
Example: 'write2file','false'
Data Types: Boolean
ErrWrngSeeAlso
—Option to check links in the see also part.logical.If ErrWrngSeeAlso is true publishFS checks whether the strings inside see also are valid files and puts an hyperlink to the corresponding HTML file. If publishFS cannot find the files exits the procedure with an error. If ErrWrngSeeAlso is false no check is done and empty links are produced. Use ErrWrngSeeAlso set to false if the purpose is just to check the code (e.g. in external environment like TRAVIS) and not to buid the help system. Default value of ErrWrngSeeAlso is true.
Example: 'ErrWrngSeeAlso',false
Data Types: logical
outstring
—string wchich contains the processed HRML file.
StringString containing parsed html file.
laste
—Information about errors.
MException classObject of class MException which provides information about last error in executing the examples. If the procedure runs without errors laste is an empty value;
This function uses routine strjoin and can be used just by those which have at least MATLAB R2013a