How do you create multiple symbolic variables?
15 ビュー (過去 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 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!