Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

if ispc && isequal(get(hObject,'BackgroundColor')
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
get(0,'defaultUicontrolBackgroundColor'));
set(hObject,'BackgroundColor','white');
end

 채택된 답변

When you open a door, you must then close it, else MATLAB will not be happy. Look carefully at the line in question. After all, MATLAB flagged it.
if ispc && isequal(get(hObject,'BackgroundColor')
Count the number of open parens. I see TWO of them.
Next, count the number of close parens. I see only ONE.
Finally, re-read the error message.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by