I am trying to display a figure with color so I am entering:
function class1()
figure('name', 'Example',...
'numbertitle', 'off',...
'menubar', 'none'...
'color',[1 1 1])
end
But I get an error:
Error: File: class1.m Line: 6 Column: 5
Unexpected MATLAB expression.
How do I fix it so I can set colour to the figure? Assistance would be greatly appreciated. MATLAB version: R2012a

 채택된 답변

Image Analyst
Image Analyst 2014년 12월 14일

0 개 추천

You forgot a command after 'none'. Try this:
hFigure = figure('name', 'Example',...
'numbertitle', 'off',...
'menubar', 'none',... % Here's where you were missing the comma
'color', [.1 .8 .5])

댓글 수: 1

Muaaman
Muaaman 2014년 12월 14일
Thank you very much Image Analyst. The error is now corrected.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

질문:

2014년 12월 14일

댓글:

2014년 12월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by