I want to know how to create dynamic string array

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개)

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

Beg your Pardon, but I am confused with the instruction if loop runs for 5 times why it creates 1x7 string array?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품

릴리스

R2020a

태그

질문:

2022년 6월 22일

댓글:

2022년 6월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by