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

 Respuesta aceptada

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.

Más respuestas (0)

Categorías

Más información sobre Function Creation en Centro de ayuda y File Exchange.

Productos

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by