Hi , I have a problem ,I really appreciate if someone can help
I tried to write a code to do this this assignment automatically
"tree.Rightkids=SE1"
here tree.Rightkids is a variable and SE1 is string .
this is my code
string1 =['tree.' ,'Rightkids']
str ='A';
eval(sprintf('%s=%c',string1,str))
but I got the following error
Error using eval
Undefined function or variable 'A'.
if anyone know How can I do this assignmnet.
I tried to write a code to do this this assignment automatically
"tree.Rightkids=SE1"
here tree.Rightkids is a variable and SE1 is string .
this is my code
string1 =['tree.' ,'Rightkids']
str ='A';
eval(sprintf('%s=%c',string1,str))
but I got the following error
Error using eval
Undefined function or variable 'A'.
if anyone know How can I do this assignmnet.