Can someone help me to see where the error is please?
2 views (last 30 days)
Error: File: AssignmentOmaira2.m Line: 17 Column: 15
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
Can someone help me to identify the error, it says it is on line 17 but I can not figure it out
Cris LaPierre on 14 Jan 2021
Your conditional statemens are using an incorrect syntax. Notice the characters that are underlined in red. It looks like you forgot to keep the function with its inputs. Are you trying to do this?
while rem(lx,h)>=0 || rem(ly,h)<=0
Image Analyst on 14 Jan 2021
Edited: Image Analyst on 14 Jan 2021
I think you mean
while rem(lx,h) ~=0 || rem(ly,h) ~= 0
promptMessage = sprintf('Incorrect Solution.\nPlease enter a value that results in an integer value.\nDo you want to Continue processing,\nor Quit processing?');
titleBarCaption = 'Continue?';
buttonText = questdlg(promptMessage, titleBarCaption, 'Try again', 'Quit', 'Try again');
if contains(buttonText, 'Quit', 'IgnoreCase', true)
% Try again.
h = input('Enter the desired grid spacing : ');