How to create the following cell array with the following pattern quickly
Afficher commentaires plus anciens
Hi,
I would like to create the following cell array quickly without explicitly stating the elements as I am doing now:
marker = {'s','o','d','p','x','+','*','>', ...
'o','d','p','x','+','*','>','s', ...
'd','p','x','+','*','>','s','o', ...
'p','x','+','*','>','s','o','d', ...
'x','+','*','>','s','o','d','p', ...
'+','*','>','s','o','d','p','x', ...
'*','>','s','o','d','p','x','+', ...
'>','s','o','d','p','x','+','*'}
As you can see there is a pattern here, there are 8 unique marker types and each consecutive group of 8 markers is based on the first 8 markers...I am new to matlab and would like to know if there is any intrinsic function that I could use or some sort of looping algorithm to create this cell array. I ask because I may need a larger cell array down the road and I think this is inefficient.
[EDITED, Jan, format improved]
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!