Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / I want to check if a variable doesn't exist and if it doesn't exits I want to run a prompt then set it in the code so the next time it is called the function will by passes the code -- so I only see the data entre once from the user prompt

I want to check if a variable doesn't exist and if it doesn't exits I want to run a prompt then set it in the code so the next time it is called the function will by passes the code -- so I only see the data entre once from the user prompt

Computer Science

I want to check if a variable doesn't exist and if it doesn't exits I want to run a prompt then set it in the code so the next time it is called the function will by passes the code -- so I only see the data entre once from the user prompt...  

 

example what I am trying to do

 

I want NOT exist so it runs the code once and after the user input the variable is set to 1 so it never runs again.

 

if exist ('FirstTime')

prompt = {'Enter Bet Amount'};

dlgtitle = 'BlackJack';

dims = [1 40];

definput = {''};

opts.Interpreter = 'tex';

answer = inputdlg(prompt,dlgtitle,dims,definput,opts);

FirstTime = 1

end

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE