how to display or input the character '

3 Ansichten (letzte 30 Tage)
angus wu
angus wu am 9 Okt. 2012
in string, the character ' is to indicate start or end of a stri. but how to display or input the character '
example, i want to set the string variable a so that it contains a single character ' only.
how?
if it is other character, it is ok like
a = 'my name' then content of a will be the string my name.
i just want a single character ' in a .
thanks
angus

Akzeptierte Antwort

Matt J
Matt J am 9 Okt. 2012
Example:
>> 'a''b'
ans =
a'b

Weitere Antworten (1)

Greg Heath
Greg Heath am 9 Okt. 2012
>> z = ' '' '
z =
'

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by