MATLAB: Input alphabet and numbers matlab inpup alphabet numbers how can I give an entry order numbers and letters together and after reading only their numbers for doing? such as x=input('alpanub')x=100a50by=100c=50 Best Answer How about the following?str = input('Enter with input: ','s');c = regexp(str,'\d+','match');output = str2double(c); Related SolutionsMATLAB: How to storage data for arrays An example with 2 entries (change n to increase the number of entries):n = 2for ii = 1:n Phone(ii).name = input('Enter the name: ', 's'); Phone(ii).number = input('Enter the phone number: ','s'); Phone(ii).address = input('Enter the address: ','s');endI am indexing the structure Phone where ii = 1,2,...You can apply this syntax to your case w/o using the loop. MATLAB: Changing switch statement to while loop You can use the menu in the while loop as follows:while menu('Information Correct?','Yes','No') == 2 wrong = menu('What is Wrong?','Name','Age','City','State','Zip'); switch wrong case 1 % Name is Wrong Name = input('Enter your name: ','s'); case 2 % Age is Wrong Age = input('Enter your age: '); case 3 % City is Wrong City = input('Enter your City: ','s'); case 4 % State is Wrong State = input('Enter your State: ','s'); case 5 % Zip Wrong Zip = input('Enter you Zip code: '); endend% while loop left, everything is correctfprintf('Nice Work! \n') Related QuestionWrite a getString() function that prompts the user for a string and returns itStringsHow to use input to make a string and fprintf to output different parts of the stringWriting a script to create a table based on user input with row names and columns
Best Answer