How to store string values from a for loop into a cell array?
20 Ansichten (letzte 30 Tage)
Neil Bhattacharjee am 15 Aug. 2016
Hi. I want the user to input an arbitrary number, and then set up a for loop that asks the question
"Enter a string" as many times as the user indicated above with the first input.
I then want to store all these string values into a cell array, and be able to retrieve these strings later.
How do I do this?
prompt = "Enter a number";
x = input(prompt)
%Code that asks user to input string