I am trying to write a matlab program that uses a while loop to prompt the user for the name of an excel file if the user entered the name incorrectly. The loop will continue to run until the name is entered correctly.
What I have so far is...
x = input('Please enter the name of the excel file: ','s');
x = input('Please enter the correct name of the the file: ','s');
Where I have the blank after the while portion is where i do not know what to put. I have tried "while x ~= 'LabData'" and this doesn't work. I've also tried "while strcmp(x, "LabData") and this runs when the name is correct, which is the opposite of what i want.
P.S. "LabData" is the name of the excel file i want the user to enter.
Thanks for any help anyone can offer.