More efficient code for placing variables in one line?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I've been looking for a while but I can t find any solution. Is there surely a better way than this to define elements:
j= j+1;
MMG(j, 1)=j;
MMG(j, 2)=1;
MMG(j, 3)=xc + r
MMG(j, 4)=xc - r
MMG(j, 5)=yc + r
MMG(j, 6)=yc - r
Apologies, this is probably basic, I couldn't find anything
0 commentaires
Réponse acceptée
the cyclist
le 3 Mai 2013
Modifié(e) : the cyclist
le 3 Mai 2013
MMG(j,1:6) = [j,1,xc+r,xc-r,yc+r,yc-r];
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!