symbol from string

8 次查看(过去 30 天)
Pietro Rossi
Pietro Rossi 2011-5-11
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

采纳的回答

Paulo Silva
Paulo Silva 2011-5-11
a='name'
syms(a)
  1 个评论
Pietro Rossi
Pietro Rossi 2011-5-11
Now, how can I use this variable?
i.e a='name'
syms (a)
c=cos(name)
but i don't know string in a..

请先登录,再进行评论。

更多回答(1 个)

Pietro Rossi
Pietro Rossi 2011-5-11
THANK YOU SO MUCH!!!

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by