How do i get multiple inputs from keyboard and store them in an array
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How do i get multiple inputs from keyboard and store them in an array
% code
valstring = input('enter the number of points ', 's');
valparts = regexp(valstring, '[ ,]', 'split');
values = str2double(valparts);
I want to store them as an array to plot a graph.
1 comentario
Walter Roberson
el 23 de Feb. de 2014
What you are doing should work, resulting in "values" being a vector.
Respuestas (1)
Dishant Arora
el 23 de Feb. de 2014
array = input('Enter elements of array'); %%Enclose the input in square braces when matlab asks
%%for it
0 comentarios
Ver también
Categorías
Más información sobre Entering Commands en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!