Mercurial > hg > ishara
annotate sequences/expdata.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | b1280319413e |
children |
rev | line source |
---|---|
samer@0 | 1 function y=expdata(A,B,N,M) |
samer@0 | 2 % expdata - exponential data sequence |
samer@0 | 3 % |
samer@0 | 4 % expdata :: |
samer@0 | 5 % real ~'initial value', |
samer@0 | 6 % real ~'final value', |
samer@0 | 7 % natural ~'number of steps (sequence length is steps+1), |
samer@0 | 8 % M:natural ~'buffer size' |
samer@0 | 9 % -> seq [[1,M]]. |
samer@23 | 10 lA=log(A); |
samer@23 | 11 k=(log(B)-lA)/N; |
samer@23 | 12 y=map(@(i)exp(lA+k*i),integers(0,N)); |