what do symbols like "nn" and "kk" do in a MATLAB script?

6 ビュー (過去 30 日間)
Rosie
Rosie 2017 年 2 月 1 日
回答済み: Star Strider 2017 年 2 月 1 日
For example, what does the following portion of a script mean/do?
for kk = 1:size(session,1)
dara_folder{kk} = strcat("whatever name you want for that folder");
end

回答 (1 件)

Star Strider
Star Strider 2017 年 2 月 1 日
The ‘kk’ is simply the variable name for a loop counter in this code. (Any valid variable name will work.) See the documentation on for (link) loops for a full explanation.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by