Problem with eval and char(13)

Hello
My problem :
chaine = b.BeamSequence.Item_1.BeamDescription with 1 change every loop
chainefinale = 'DM=1.3692
SEG=2' with a char(13) inside (before SEG)
the eval ([chaine '=' chainefinale]) return error.....
What can i do ?
Thanks
Alain

回答 (2 件)

Walter Roberson
Walter Roberson 2013 年 10 月 21 日

0 投票

Don't use eval.
itemnumber = 1;
b.BeamSequence.(sprintf('Item_%d', itemnumber)).BeamDescription = chainefinale;
Alain
Alain 2013 年 10 月 22 日

0 投票

Thank ! Best regard Alain

カテゴリ

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

製品

質問済み:

2013 年 10 月 21 日

回答済み:

2013 年 10 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by