how to display or input the character '

13 visualizzazioni (ultimi 30 giorni)
angus wu
angus wu il 9 Ott 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

Risposte (2)

Matt J
Matt J il 9 Ott 2012
Example:
>> 'a''b'
ans =
a'b

Greg Heath
Greg Heath il 9 Ott 2012
>> z = ' '' '
z =
'

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by