Matlab合并的字符串中带有单引号

matlab在合并字符串的时候,如果字符串中有单引号,如何处理单引号

Réponses (1)

Xiaoning.Wang
Xiaoning.Wang le 3 Juil 2023

0 votes

单号号,可以使用三个单引号,进行处理
如:
>> ['set_param(char(ds_Sw),' '''OutDataTypeStr''' ',' 'myname)']
ans =
set_param(char(ds_Sw),'OutDataTypeStr',myname)

Catégories

Produits

Version

R2016b

Community Treasure Hunt

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

Start Hunting!