File Exchange

image thumbnail

Classic watch

version 1.0 (1.96 KB) by

Displays the analog clock and digital clock

4 Downloads

Updated

View License

Using a simple timer allows to build a beautiful watch.

Comments and Ratings (3)

Ali Osman

Haim

Haim (view profile)

Jan Simon

Jan Simon (view profile)

I'd definitely omit the header "close all;
fig=figure(1);". It is not useful to close other figures from here and the hard-coded figure handle 1 is not secure. Better use an non-integer handle to avoid collisions with other figures.

Creating the display in each timer callback completely, it would take much less processing time to update only the changed elements. Simply store the handles of the created objects in the TIMER's UserData and update the XData and YData of the PATChas well as the String property of the text showing the current time.

MATLAB Release
MATLAB 7.12 (R2011a)
Tags Add Tags

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video