how can I convert a string to an expression which "symvar" can search for identifiers?
    8 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
how can I convert a string to an expression which "symvar" can search for identifiers?
I use this: symvar 'cos(pi*x - beta1)'
ans =
    'beta1'
    'x'
and it works, but when I use this:
      insertfunction='cos(pi*x - beta1)'
symvar insertfunction
it doesn't have the same results. How can I make it?
0 commentaires
Réponse acceptée
Plus de réponses (1)
  Ivan van der Kroon
      
 le 7 Juin 2011
        insertfunction='cos(pi*x - beta1)'
>> symvar(insertfunction)
ans = 
    'beta1'
    'x'
0 commentaires
Voir également
Catégories
				En savoir plus sur Characters and Strings dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


