关于双引号的使用问题。

8 visualizaciones (últimos 30 días)
cajosi
cajosi el 23 de Nov. de 2022
Respondida: dolexa el 23 de Nov. de 2022
>> a='''nihao'''
a =
'nihao'
>> a='nihao'
a =
nihao
这两种情况下a都是字符类型,那么这两种到底有什么不一样啊?什么是字符串变量?

Respuesta aceptada

dolexa
dolexa el 23 de Nov. de 2022
字符串里要插入一个单引号时,必须输入两个单引号,第一个单引号相当于转义字符,告知matlab将第二个单引号作为一个字符插入

Más respuestas (0)

Categorías

Más información sobre 字符和字符串 en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!