samer@34: function [y,phi]=block(o,phi,n,f) samer@42: % block - generate block of sine wave samples samer@42: % samer@42: % sine/block :: samer@42: % sine ~'sine generator object', samer@42: % real ~'phase at start of block', samer@42: % N:natural ~'number of samples to generate', samer@42: % real ~'frequence in cycles per sample' samer@42: % -> [[1,N]] ~'block of output samples', samer@42: % real ~'phase at end of block'. samer@34: samer@34: w=2*pi*f; samer@34: y=sin(2*pi*phi + w*(0:n-1)); samer@34: phi=mod(phi+f*n,1); samer@34: