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

Antworten (2)

Walter Roberson
Walter Roberson am 21 Okt. 2013

0 Stimmen

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

0 Stimmen

Thank ! Best regard Alain

Kategorien

Mehr zu Variables finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 21 Okt. 2013

Beantwortet:

am 22 Okt. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by