Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
Show older comments
I am trying to make 5 boxes, one in the center and one in each quadrant of the screen and my script keeps getting stuck here. I checked for matching brackets and parentheses and that I'm not missing any multiplication symbols but I still get the below error every time. Any advice?
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
locations=[(center(1)-offsetx-(.5*boxsize),center(y)-offsety-(.5*boxsize),center(1)-offsetx+(.5*boxsize), center(y)-offsety+(.5*boxsize));...
center(1)+offsetx-(.5*boxsize), center(y)-offsety-(.5*boxsize),center(1)+offsetx+(.5*boxsize), center(y)-offsety+(.5*boxsize);...
center(1)-offsetx-(.5*boxsize), center(y)+offsety-(.5*boxsize),center(1)-offsetx+(.5*boxsize), center(y)+offsety+(.5*boxsize);...
center(1)+offsetx-(.5*boxsize), center(y)+offsety-(.5*boxsize),center(1)+offsetx+(.5*boxsize), center(y)+offsety+(.5*boxsize)];
Accepted Answer
More Answers (0)
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!