I want to know how to create dynamic string array

15 visualizaciones (últimos 30 días)
Aakriti Srivastava
Aakriti Srivastava el 22 de Jun. de 2022
Comentada: Aakriti Srivastava el 23 de Jun. de 2022
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.

Respuestas (1)

Walter Roberson
Walter Roberson el 22 de Jun. de 2022
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 comentario
Aakriti Srivastava
Aakriti Srivastava el 23 de Jun. de 2022
Beg your Pardon, but I am confused with the instruction if loop runs for 5 times why it creates 1x7 string array?

Iniciar sesión para comentar.

Categorías

Más información sobre Data Types en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by