%
% Sample program for including C/C++ source inside .m files.
%
% This example collects samples from a C function double dsp_read()
% into the matrix a.
% Then, a spectrum is displayed.
%
% Translate by:
%
%		matcom samp_dsp /x
%
% This example will compile only if the dsp_read() function is supplied.
%
% (c) Copyright Yaron Keren 1995
%

L=1024; % 1024 samples
a=zeros(L,1);
%MATCOM% C=for (int j=1;j<=1024;j++) {
%MATCOM% C=  a.r(j)=dsp_read();
%MATCOM% C=}
plot(abs(fft(a)))
