create symbolic variables
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
My problem is the following:
if I have an array ij then have to create variables ij.
ex.:
a = [ 1 2; 3 4]
then
b = [x11 x21;x12 x22]
have to create the variables corresponding to the size of the matrix.
These variables can be syms or string. Can I convert the string to syms after.
thanks advanced
Réponse acceptée
Andrei Bobrov
le 8 Nov 2011
a = [1 2;3 4];
x = sym('x%d%d',size(a)).'
please read: doc sym
0 commentaires
Plus de réponses (1)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!