FDCDIR is a utility that builds pathnames for subdirectories of the FDC toolbox. It is called by several other programs from the toolbox to determine file-locations.
Due to the fact that the FDC root-directory will be different on different systems, referencing FDC subdirectories can be difficult. To facilitate this, the function FDCDIR was constructed. Calling this function for a user-specified FDC subdirectory will result in a complete path to this directory, that is: the subdirectory will be enhanced with the root-directory of the FDC toolbox.
If the resulting pathname does not exist, a warning message will be displayed. There are two possible causes for this condition to occur:
fdc.ini
. If that file can't be found, FDCDIR will try the default FDC root-location MATLABROOT\toolbox\fdc14
.D = fdcdir
returns the root-directory of the FDC toolbox and stores it in the string-variable D.
D = fdcdir(NAME)
returns the complete path of the FDC subdirectory specified in the string-variable NAME to the string variable D.
D = fdcdir(NAME1,NAME2)
returns the complete path of the FDC sub-subdirectory specified in the string-variable NAME2, which itself is contained in the FDC subdirectory specified in the string-variable NAME2 (see the example below).
More input arguments are allowed (but not very practical), as long as the inputs are all string variables.
Suppose we call FDCDIR with the following command:
D = fdcdir('MODELS')
and C:\MATLAB\TOOLBOX\FDC14
is specified as root-directory in the file fdc.ini
. This yields:D = 'C:\MATLAB\TOOLBOX\FDC14\MODELS'
.
Using this same root-directory, the command:D = fdcdir('MODELS','AIRCRAFT')
will yield:D = 'C:\MATLAB\TOOLBOX\FDC20\MODELS\AIRCRAFT'
.
The macro's DATADIR and HELPDIR make use of this function to specify the FDC data-directory and the location of the on-line helpfiles, respectively.