put a matrix as a variable in another matrix so i can access different matrixes
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Joris Somers
le 11 Mai 2019
Réponse apportée : Cam Salzberger
le 13 Mai 2019
I want to acces 4 differenet matrixes 1 at the time, this is probably not at all how it works but I tried this.
tn = [th ho tm mi] %time now
for n = 1:4;
c = tn(n)
% here comes to code to change the clock
end
this with th, ho, tm and mi being tens hours, hours, tens minutes and minutes (I'm programming a robot arm that puts pins in certain holes which creates teh immage of a digital clock). example:
ho=[ 1 1 1;
1 0 0;
1 1 1;
0 0 1;
1 1 1];
the hour now is 5.
but to get to the point. I first want to let the robot run a script for the minutes, then the same script for the ten minutes, then for the hours and then for the ten hours.
0 commentaires
Réponse acceptée
Cam Salzberger
le 13 Mai 2019
Hello Joris,
tn = {th ho tm mi};
for n = 1:4;
c = tn{n};
end
-Cam
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Calendar 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!