take input in array
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Tejas Mahajan
 el 9 de Oct. de 2020
  
    
    
    
    
    Comentada: Ameer Hamza
      
      
 el 9 de Oct. de 2020
            if i want user to to input n number of values in the input window in array form how should i do it
0 comentarios
Respuesta aceptada
  Ameer Hamza
      
      
 el 9 de Oct. de 2020
        vec = input('Enter an array: ')
run the above line and type
[1,2,3,4]
in the command window. You will get
>> vec
vec =
     1     2     3     4
2 comentarios
  Ameer Hamza
      
      
 el 9 de Oct. de 2020
				You can use the UI Editfield: https://www.mathworks.com/help/releases/R2020b/matlab/ref/uieditfield.html.
Más respuestas (1)
  madhan ravi
      
      
 el 9 de Oct. de 2020
        Use input() , enter the values in the form [1,5,4] an example.
 doc input
Ver también
Categorías
				Más información sobre Develop Apps Using App Designer 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!


