Reducing steps in code
古いコメントを表示
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?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Pie Charts についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!