Question: In MATLAB, my script file I asks the question to continue, restart or quit as shown below. prompt='Do you want to continue [C], restart [R]
In MATLAB, my script file I asks the question to continue, restart or quit as shown below.
prompt='Do you want to continue [C], restart [R] or quit [Q]?'; Answer=input(prompt,'s'); if strcmpi('C',Answer) continue elseif strcmpi('R',Answer); else strcmpi('Q',Answer); quit; end
If they choose to restart, how would I write that in code? Would I have to end the script file and then start it?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
