Reducing steps in code
Afficher commentaires plus anciens
Is there a way to create a vector and take only the nth value of that vector, all in one line? For example if I wanted to return the current year I could easily do it in two lines:
d = datevec(date);
y = d(1);
Can I do this without first defining d?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Pie Charts 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!