How do you create multiple symbolic variables?
17 次查看(过去 30 天)
显示 更早的评论
Here is my code, but is there a simpler solution?
% create symbolic variables x1,...,xn
for i=1:n
eval(join(['syms x' string(i)],''));
end
0 个评论
采纳的回答
madhan ravi
2019-8-2
编辑:madhan ravi
2019-8-2
n = 4;
X=sym('x',[1,n]);
syms(X)
If you're using 2019a or later:
n = 4;
syms x [1 n]
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!