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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!