Why does my menu selection screen not show all the values?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Gavin Thompson
el 8 de Sept. de 2021
Comentada: Gavin Thompson
el 8 de Sept. de 2021
Days = [1;2;5;6;8;10;12];
LocationID = ["NW102","SE321","ESE020"];
% Prompt user to select day and location based on data provided
dayChoice = menu('Please select a day',Days);
locationChoice = menu('Please select a location',LocationID);
Whenever I run this script, on the user selection interface for Days the only value that shows up is 1. It works perfectly fine for the LocationID choice selection so I'm not sure whats wrong. I have tried converting Days into a row vector but that hasn't helped either.
0 comentarios
Respuesta aceptada
Walter Roberson
el 8 de Sept. de 2021
options must be a cell array of character vectors, or a string array. Yours is neither of those.
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Type Conversion 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!