clear all;

f = 1000;
t = linspace(0, 1, 10000);
y = sin(2 * pi * f * t);
p = audioplayer(y,1/(t(2) - t(1)));
play(p);
## clear p; ## If you enable this line, no segmentation fault will occur!
## exit(0); ## If you enable this line, no segmentation fault will occur!
