MATLAB GUI - Geometrical shapes and changing their color
5 views (last 30 days)
Show older comments
Hello! I have to make a small project for university but the teacher didn't work with us in MATLAB GUI so i have absolutely no idea. I have to draw 6 geometrical shapes (like a square, circle, etc) using the FILL command and by using a button. For exemple: When I click on a pushbutton with the name "Square", it appears a square. For this I made something like this:
function square_Callback(hObject, eventdata, handles)
axis([0 10 0 10])
hold on
fill([2 8 8 2],[2 2 8 8], 'r')
But now it comes the hard part. I have to make a button and when I click the button, the square changes its color, let's say from red to yellow and also, another button that changes the background color. Can you help me please?
0 Comments
Answers (0)
See Also
Categories
Find more on Specifying Target for Graphics Output 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!