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

make_round(hfl,ha)
function make_round(hfl,ha)

global r xys

ar=get(ha,'DataAspectRatio');

no=get(hfl,'Userdata');
x=xys(1,no);
y=xys(2,no);


% draw marker as circle:
al=0:pi/12:2*pi;
if ar(1)>ar(2)
    xa=x+ar(1)*r/ar(2)*cos(al);
    ya=y+r*sin(al);
else
    xa=x+r*cos(al);
    ya=y+ar(2)*r/ar(1)*sin(al);
end

set(hfl,'XData',xa);
set(hfl,'YData',ya);

Contact us