how can i create "x" empty vectors to begin refill it?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Erick Guzman
el 16 de Jun. de 2022
Respondida: Steven Lord
el 16 de Jun. de 2022
i wanna do something like, example:
p=input("please input the number of vector that you want:")
i dont know if use while or for to do this but, the important thing its create x vectors
x1=[ ];
x2=[ ];
x3=[ ];
...
xn=[ ];
0 comentarios
Respuesta aceptada
Steven Lord
el 16 de Jun. de 2022
Can you dynamically create variables with numbered names like x1, x2, x3, etc.? Yes.
Should you do this? The general consensus is no. That Answers post explains why this is generally discouraged and offers several alternative approaches.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!