system

Executes the shell command stringCommand.

Syntax

R1 =system(stringCommand)

[R1, R2] = system(stringCommand)

Inputs

stringCommand
Command to be executed in operating system shell.
Type: string

Outputs

R1
The status of the system command executed
Type: integer
R2
Optional output which contains any text echoed to standard output when the system command is executed.
Type: string

Examples

Run the system command, without retrieving the output
R = system('echo %date% %time%')
R = 0
Run the system command, with the text displayed to standard output
[R1, R2] = system('echo %date% %time%')
R1 = 0
R2 = Fri 02/09/2018 12:24:58.52