MATLAB: How characters connected in quotes

characterquotes

Hello,
I am complete beginer. Cannot find answers on the web, and don't know how to search the answer.
I don't know the rules of connecting the characters in the quotes. Wonder what makes a difference of the double and trible and space in the rule of connection
excute the following command
['a'' b ' '''c''']
['a'' b ' ''' c ''']
['a','b']
['a' 'b']
['a'' b ']
the answers are the following
ans =
'a' b 'c''
ans =
'a' b ' c ''
ans =
'ab'
ans =
'ab'
ans =
'a' b '
Any explanation and ways to teach me how to find the answer are all appreciated. Many thanks!

Best Answer

See the char documentation for information on character arrays, and string for information on string arrays.
Those should provide the information you likely need, and an introduction to the online documentation.
To find that information in your own MATLAB installation, type:
doc char
doc string
in your Command Window or a script (then run the script).