MATLAB: Why am I getting Illegal use of reserved keyword “else”.

error: file: radar_new.m line: 193 column: 1 illegal use of reserved keyword "else".

Error: File: radar_new.m Line: 193 Column: 1
Illegal use of reserved keyword "else".

Best Answer

Including an ellipsis (three dots) in a line indicates to MATLAB that the command on that line continues to the next, but you left the rest of the command on the same line. If you intended to break the command across multiple lines you need to put the rest of the command on that next line. So trying to run a command like this won't work since the command doesn't actually end.
plot(1:10, ... 1:10)
You would need to write it like this:
plot(1:10, ...
1:10)
Yes, I know this command is short enough that you could write it all on one line, but I'm just using this as a simple example.