How do you create multiple symbolic variables?
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Richárd Tóth
il 2 Ago 2019
Modificato: madhan ravi
il 2 Ago 2019
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 Commenti
Risposta accettata
madhan ravi
il 2 Ago 2019
Modificato: madhan ravi
il 2 Ago 2019
n = 4;
X=sym('x',[1,n]);
syms(X)
If you're using 2019a or later:
n = 4;
syms x [1 n]
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!