Hi, I want use a string saved in a variable like name of a symbol. If a='name', then i want to create a symbol called name (syms name). How can i do it?
Thanks a lot for your answers. Pietro Rossi

 Réponse acceptée

Paulo Silva
Paulo Silva le 11 Mai 2011

0 votes

a='name'
syms(a)

1 commentaire

Pietro Rossi
Pietro Rossi le 11 Mai 2011
Now, how can I use this variable?
i.e a='name'
syms (a)
c=cos(name)
but i don't know string in a..

Connectez-vous pour commenter.

Plus de réponses (1)

Pietro Rossi
Pietro Rossi le 11 Mai 2011

0 votes

THANK YOU SO MUCH!!!

Catégories

En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by