I want to know how to create dynamic string array

21 ビュー (過去 30 日間)
Aakriti Srivastava
Aakriti Srivastava 2022 年 6 月 22 日
コメント済み: Aakriti Srivastava 2022 年 6 月 23 日
I have set of elements in my schematic and after sorting the connection of elemnent I want to store the element name in the string array.

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 6 月 22 日
for K = 1 : 5
out(randi(10)) = "entry #" + K;
end
out
out = 1×7 string array
"entry #4" <missing> "entry #5" "entry #1" <missing> "entry #2" "entry #3"
  1 件のコメント
Aakriti Srivastava
Aakriti Srivastava 2022 年 6 月 23 日
Beg your Pardon, but I am confused with the instruction if loop runs for 5 times why it creates 1x7 string array?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by