Mercurial > hg > ishara
view dsp/synth/@square/block_sr.m @ 38:9d24b616bb06
Added function algebra.
author | samer |
---|---|
date | Tue, 29 Jan 2013 15:59:01 +0000 |
parents | c75bb62b90a9 |
children |
line wrap: on
line source
function [y,phi]=block(o,phi,duty,f) % block - generate square wave u=cumsum([phi,1./ceil(1./f)]); y=mod(u(1:end-1),1)<duty; phi=mod(u(end),1);