[Scilab-users] varialble and string
Antoine Monmayrant
antoine.monmayrant at laas.fr
Fri Oct 30 13:28:10 CET 2015
Le 10/30/2015 01:03 PM, jbaudais at insa-rennes.fr a écrit :
> Hello,
>
> I use multiple variables with names given in a matrix, or vector
>
> > x=["a","b","c","d","e"];
>
> I can easily use the variable with the function eval in math expression
>
> > 2*eval(x(1))+1
>
> But if I want
>
> > a=1;
>
> How can I do this using the vector x only? I try
>
> > execstr("x(1)=1")
Is this what you want to do:
-->x=["a","b","c","d","e"];
-->execstr(x(1)+"=1")
-->a
a =
1.
?
Antoine
>
> but the answer is "Pas encore implémenté dans Scilab...", with Scilab
> 5.3.3.
>
> Thanks,
>
> Jean-Yves
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
More information about the users
mailing list