inputdlg Window Not Showing
So I was creating an even or odd checker using inputdlg. However, when I ran it, the inputdlg window actually does not show up. Here is the code/proof that I used so far.
prompt={"Enter a 1 x 1 integer value:"}
dlgtitle="Even or odd test"
tmp=inputdlg(prompt,dlgtitle)
user_number=round(str2double(tmp))
if not(isnan(user_number))
fprintf("Number is valid.n")
if rem(user_number,2)==0
fprintf("Your number is even.n")
else
fprintf("Your number is odd.n")
end
else
fprintf("Number is not valid.n")
end
There aren’t any errors or warnings shown on there. Can someone tell me if there is a way to get the inputdlg window to show (if it has something to do with the code)?So I was creating an even or odd checker using inputdlg. However, when I ran it, the inputdlg window actually does not show up. Here is the code/proof that I used so far.
prompt={"Enter a 1 x 1 integer value:"}
dlgtitle="Even or odd test"
tmp=inputdlg(prompt,dlgtitle)
user_number=round(str2double(tmp))
if not(isnan(user_number))
fprintf("Number is valid.n")
if rem(user_number,2)==0
fprintf("Your number is even.n")
else
fprintf("Your number is odd.n")
end
else
fprintf("Number is not valid.n")
end
There aren’t any errors or warnings shown on there. Can someone tell me if there is a way to get the inputdlg window to show (if it has something to do with the code)? So I was creating an even or odd checker using inputdlg. However, when I ran it, the inputdlg window actually does not show up. Here is the code/proof that I used so far.
prompt={"Enter a 1 x 1 integer value:"}
dlgtitle="Even or odd test"
tmp=inputdlg(prompt,dlgtitle)
user_number=round(str2double(tmp))
if not(isnan(user_number))
fprintf("Number is valid.n")
if rem(user_number,2)==0
fprintf("Your number is even.n")
else
fprintf("Your number is odd.n")
end
else
fprintf("Number is not valid.n")
end
There aren’t any errors or warnings shown on there. Can someone tell me if there is a way to get the inputdlg window to show (if it has something to do with the code)? inputdlg MATLAB Answers — New Questions