i have string ['_ ,,,77 - -'''''"''"i''-_G8" ']
but it is illegal how to create it

 採用された回答

Thorsten
Thorsten 2015 年 4 月 30 日
編集済み: Thorsten 2015 年 4 月 30 日

0 投票

Use
''
for every
'
that you need in string, like:
disp('That''s not hard to understand.')
or
>> mystring = '[''_ ,,,77 - -''''''''''"''''"i''''-_G8" '']'
mystring =
['_ ,,,77 - -'''''"''"i''-_G8" ']

その他の回答 (2 件)

michael scheinfeild
michael scheinfeild 2015 年 4 月 30 日

0 投票

not works b='abc"'
b =
abc"

1 件のコメント

Thorsten
Thorsten 2015 年 4 月 30 日
編集済み: Thorsten 2015 年 4 月 30 日
' is used in Matlab to indicate the start and end of a string, but the ' are not part of the string. To get the ' as part of the string, you have to type them twice (enclosed by ' to denote a Matlab string):
b='''abc"'''

サインインしてコメントする。

michael scheinfeild
michael scheinfeild 2015 年 4 月 30 日

0 投票

but the length is ok so it may be helpful to me

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

製品

タグ

質問済み:

2015 年 4 月 30 日

編集済み:

2015 年 4 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by