MATLAB newbie, here.
I'm doing a coding assignment.
This works perfectly fine:
sexq = '(F)emale, (M)ale, (O)ther, (P)refer not to say';
sexa = inputdlg(sexq, 'What is your sex?');
However, when I try to use this:
ageq = 'Participants must be between 18 and 80';
agea = inputdlg(ageq, 'What is your age?');
I consistently get this:
Incorrect use of '=' operator. To assign a
value to a variable, use '='. To compare
values for equality, use '=='.
I've already looked at:
I've tried writing it afresh in a new window to see if I'd picked up any text endcoding weirdness having copy/pasted some of the text from a PDF, but it's made no difference. Restarting MATLAB hasn't helped either. Everytime, the first one works, the second one does not.
Thanks in advance.