Specify the fields of a name-value structure as the names of all writable properties of the class.
String and Character Formatting
Some special characters can only be used in the text of a character vector or string. You can use these special characters to insert new lines or carriage returns, specify folder paths, and more.
Use the special characters in this table to specify a folder path using a character vector or string.
/\
Name: Slash and BackslashUses: File or folder path separationDescription: In addition to their use as mathematical operators, the slash and backslash characters separate the elements of a path or folder. On Microsoft® Windows® based systems, both slash and backslash have the same effect. On The Open Group UNIX® based systems, you must use slash only.ExamplesOn a Windows system, you can use either backslash or slash:dir([matlabroot '\toolbox\matlab\elmat\shiftdim.m']) dir([matlabroot '/toolbox/matlab/elmat/shiftdim.m']) On a UNIX system, use only the forward slash:dir([matlabroot '/toolbox/matlab/elmat/shiftdim.m'])
..
Name: Dot dotUses: Parent folderDescription: Two dots in succession refers to the parent of the current folder. Use this character to specify folder paths relative to the current folder.ExamplesTo go up two levels in the folder tree and down into the test folder, use:cd ..\..\testMore Informationcd
*
Name: AsteriskUses: Wildcard characterDescription: In addition to being the symbol for matrix multiplication, the asterisk * is used as a wildcard character.Wildcards are generally used in file operations that act on multiple files or folders. MATLAB matches all characters in the name exactly except for the wildcard character *, which can match any one or more characters.ExamplesLocate all files with names that start with january_ and have a.mat file extension:dir('january_*.mat')
@
Name: At symbolUses: Class folder indicatorDescription: An @ sign indicates the name of a class folder.ExamplesRefer to a class folder:\@myClass\get.mMore InformationFolders Containing Class Definitions
+
Name: PlusUses: Namespace directory indicatorDescription: A + sign indicates the name of a namespace folder.ExamplesNamespace folders always begin with the + character:+myfolder +myfolder/pkfcn.m % a namespace function +myfolder/@myClass % class folder in a namespaceMore InformationCreate Namespaces
There are certain special characters that you cannot enter as ordinary text. Instead, you must use unique character sequences to represent them. Use the symbols in this table to format strings and character vectors on their own or in conjunction with formatting functions like compose, sprintf, and error. For more information, see Formatting Text.