% % Data file bandlimit.m for problem 2 on the EE263 midterm, October 2007. % % Defines M, N, sigma, tsamp, ysamp. % M = 27; N = 512; tsamp = ... [ 1; 41; 43; 75; 86; 141; 148; 173; 200; 208; 228; 239; 254; 275; 279; 280; 298; 311; 315; 348; 360; 371; 396; 403; 451; 471; 512]; ysamp = ... [ 0.0700; 0.0274; 0.0481; -0.1520; -0.2702; -0.0181; -0.1491; -0.0400; -0.1022; -0.1693; -0.0310; 0.0631; -0.0194; -0.0307; 0.0376; 0.0532; 0.3618; 0.2472; 0.1519; -0.0521; 0.1546; 0.1723; -0.0659; -0.0340; -0.0329; 0.0806; -0.0252]; sigma = 0.003; % Temporary variable to show/disable graph. SHOWGRAPH = 1; if SHOWGRAPH figure() plot(tsamp, ysamp, 'ko'); axis([0 512 -0.5 0.5]) legend('Sampled points') end % Tidy up temporary variable. clear SHOWGRAPH; % To create a plot with yhat and ysamp together, uncomment the following code. % figure() % plot(tsamp, ysamp, 'ko'); % hold on; % plot(1:N, yhat); %% Mark the point yhat(129). % plot(129, yhat(129), 'rs')