创建N个变量的问题。

1 vue (au cours des 30 derniers jours)
新锦江娱乐现场开户【微8785092】
已知n的数值,怎么去创建n个变量就是如果n=4,需要建立n1 n2 n3 n4,有没有函数可以解决这个问题呢,求大佬解答

Réponse acceptée

新锦江娱乐注册官网【微8785092】
syms函数(超链接,自己点进去看) 里面就有示例,比如 syms n [ 1 4 ]
但实际使用中,除非真的需要四个符号变量做符号计算,这种搞n1 n2 n3 n4的写法,在数值运算中,一般直接写作向量n,然后调用n( 1 )到n( 4 )

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox 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!