Main Content

cmdsep

Command separator for current platform

Since R2023b

Description

c = cmdsep returns the platform-specific command separator character. The command separator is the character that separates individual commands.

example

Examples

collapse all

Return the command separator on a Microsoft® Windows® platform.

c = cmdsep
c = 

    "&&"

Open a second instance of MATLAB® in a different folder. You can create a chain of system commands by using cmdsep with system.

system("cd myfolder/" + cmdsep + "matlab");

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™. (since R2024b)

Version History

Introduced in R2023b

See Also

| | | | |