Code covered by the BSD License  

Highlights from
Waveform Generator GUI

image thumbnail

Waveform Generator GUI

by

 

02 Apr 2009 (Updated )

Generate waveformed signal and play it. Interactive GUI with movable datapoints.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

hfl=create_marker(ha,x,y,r,c,uf,no)
function hfl=create_marker(ha,x,y,r,c,uf,no)
% create movable with mouse marker
% ha - axes handler
% (x,y) - marker position
% r - marker radius
% c - marker color
% uf - update function


% rdraw marker as circle:
al=0:pi/12:2*pi;
xa=x+r*cos(al);
ya=y+r*sin(al);
hfl=fill(xa,ya,c,'parent',ha);

% what to do if ckicked:
set(hfl,'ButtonDownFcn',['bdf(' num2str(ha,'%20.20f') ',' num2str(hfl,'%20.20f') ',''' uf '''' ')']);

set(hfl,'Userdata',no); % memorize number

Contact us