pwd
Returns the current working directory.
Syntax
R = pwd()
Outputs
- R
- Current working directory.
Example
Simple example:
cd('c:\tests')
R = pwd()
R = c:\tests
Discover new features and enhancements.
Discover Compose, including its language support and system requirements.
The Compose tutorials and associated example model files help introduce you to the basic functionality of the software.
Learn about the features and functionality available in Compose.
Reference guides are available for functions and commands supported by OML, Tcl, and Python.
OpenMatrix is a mathematical scripting language.
The Reference Guide contains documentation for all functions supported in the OpenMatrix language.
Returns R after copying file(s) or directories from src to dst.
Reads the values of a 2D matrix, R, from the file, f, where the values are comma-separated.
Writes the values of a 2D matrix, m, to the file, f, where the values are comma-separated.
Reads the values of a 2D matrix, R, from the file, f.
Writes the values of a 2D matrix, m, to the file, f.
Closes a file opened by fopen(). Requires the fileID returned by fopen as an argument.
Returns 1 if an end-of-file symbol is encountered.
Display the error status of fileID.
Flush buffered output to fileID to be written the file.
Reads the characters in a file until reaching request_length of characters read. Reads until a new line or end of file if request_length is not provided.
Reads the characters in a file until hitting len of characters read, a new line or end of file if len is not provided.
Returns the directory, name, and extension components of the file filepath.
Opens a file, filename, for read/write operations.
This function writes output to a file using the printf format_string capabilities. The first argument is a fileID returned from an earlier call to fopen.
Reads the binary data of the precision type from the file fileID.
Moves the file pointer to the beginning of the file fileID. Returns 0 on success.
Returns result R after reading a formatted data from file handle, f, specified by template t.
Sets the file pointer to a position in fileID. Returns 0 if successful; returns -1 if unsuccessful.
Returns the current position of the file pointer.
Returns a filename from dir1...dirN and filename fname.
Writes binary data to the file ID.
Returns all entities saved in a Project (.aprj) file: breakpoints, files, plots, source code and variables.
Returns result R after reading a file, f. Different reading mechanisms are used, based on the type of file, f.
Returns true if dir is a directory.
Returns true if the input argument is a file.
Returns true if the application is running on OSX.
Returns true if the application is running on a Windows operating system.
Returns true if the application is running on a Unix system.
Reads the content of a MAT file.
Returns R after moving file(s) or directories from src to dst.
Returns the filename of the currently running script.
Returns the line number of the currently running script.
Displays or sets the character used to separate directories in the path.
Displays the string str to the Command window or Console prompt.
Returns the current working directory.
Updates a file name from oldname to newname. Returns 0 if successful and non-zero otherwise. An optional output argument, errormessage, can be used to retrieve any additional system error messages on failure.
Save variables in the MAT file, filename.
Used in the fseek function to change the file position relative to the current file position.
Used in the fseek function to change the file position relative to the end of the file.
Used in the fseek function to change the file position relative to the beginning of the file.
Returns the file ID corresponding to the error stream.
Returns the numeric file ID corresponding to the standard input stream of the application console mode.
Returns the numeric file ID corresponding to the standard output stream of the application console mode.
Returns result R after reading a formatted data from a file, f, specified by an optional template, t.
Returns result R after reading a formatted data from a file stream \, f, or string, s.
Extracts file(s) from the archive, archive, and is defined in the omlziptoolbox.
Closes an Excel file opened through the command, xlsopen, and whose details are in data with functions defined in omlxlstoolbox. xlsclose is available only on Windows systems where Microsoft Excel is installed.
Provides information about Excel compatibility with the file, file, using omlxlstoolbox.
Opens an Excel compatible file, file, and stores the information in R using functions defined in omlxlstoolbox. xlsopen is available only on Windows systems where Microsoft Excel is installed.
Reads data, which is an Excel-compatible file or a structure returned from xlsopen, with functions defined in omlxlstoolbox. xlsread is available only on Windows systems where Microsoft Excel is installed.
Writes data to file, which is either an Excel-compatible file or a structure returned from xlsopen, with functions defined in omlxlstoolbox. xlswrite is available only on Windows systems where Microsoft Excel is installed.
Archives the file(s), files, and is defined in the omlziptoolbox.
Reference guides are available for functions and commands supported by OML, Tcl, and Python.
The Reference Guide contains documentation for all functions supported in the OpenMatrix language.
Returns the current working directory.
Returns the current working directory.
R = pwd()
Simple example:
cd('c:\tests')
R = pwd()
R = c:\tests
(c) Altair Engineering, Inc. All rights reserved.