for Loop counting Array

5 visualizaciones (últimos 30 días)
Qiabin John Su
Qiabin John Su el 17 de Mzo. de 2021
Respondida: Star Strider el 17 de Mzo. de 2021
I'm trying to ask the user for an integer input, then store that value as N.
Making a for loop from 1:N creating an array storing elements from 1 to N vertically. like
1
2
3
to N

Respuestas (1)

Star Strider
Star Strider el 17 de Mzo. de 2021
I prefer using inputdlg for the inputs. Then see the documentation section on Matrix Indexing to understand how to create the vector.

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by