changeset 1:4c4bd2eab6e7

Fix to allow ramping from zero.
author tomwalters
date Fri, 20 May 2011 12:36:17 +0100
parents 74dedb26614d
children 8bd33a2931a3
files Sounds/freqprofile.txt aim-mat/tools/@signal/rampamplitude.m
diffstat 2 files changed, 54 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/Sounds/freqprofile.txt	Fri May 20 12:32:31 2011 +0100
+++ b/Sounds/freqprofile.txt	Fri May 20 12:36:17 2011 +0100
@@ -1,50 +1,50 @@
-1000	0.0003745
-2000	0.00032037
-3000	0.00090275
-4000	0.0029595
-5000	0.0059385
-6000	0.0078835
-7000	0.007494
-8000	0.0060847
-9000	0.0046621
-10000	0.0066574
-11000	0.01128
-12000	0.013275
-13000	0.012507
-14000	0.0098303
-15000	0.010794
-16000	0.013058
-17000	0.015763
-18000	0.027611
-19000	0.040498
-20000	0.045664
-21000	0.046239
-22000	0.049006
-23000	0.048659
-24000	0.041914
-25000	0.036679
-26000	0.028243
-27000	0.021026
-28000	0.017685
-29000	0.019133
-30000	0.02211
-31000	0.025596
-32000	0.02644
-33000	0.023552
-34000	0.019867
-35000	0.0161
-36000	0.012248
-37000	0.0099462
-38000	0.013779
-39000	0.017035
-40000	0.01648
-41000	0.013519
-42000	0.010507
-43000	0.0091298
-44000	0.0074301
-45000	0.0060468
-46000	0.0056208
-47000	0.0057545
-48000	0.0056186
-49000	0.005049
-50000	0.0041599
+100	4.5695
+120.34	9.7538
+141.95	18.97
+164.89	21.883
+189.24	17.891
+215.11	12.99
+242.57	12.547
+271.74	23.25
+302.71	30.048
+335.59	28.329
+370.51	23.04
+407.59	18.963
+446.96	18.962
+488.77	18.541
+533.17	19.003
+580.31	20.933
+630.37	20.393
+683.53	17.127
+739.97	13.525
+799.91	10.551
+863.55	8.4164
+931.13	6.9472
+1002.9	5.6782
+1079.1	4.3983
+1160	3.3072
+1245.9	2.4813
+1337.2	1.8913
+1434.1	1.652
+1536.9	1.9348
+1646.2	2.4831
+1762.2	3.5886
+1885.4	6.3548
+2016.2	10.307
+2155.1	13.408
+2302.5	13.849
+2459.1	12.665
+2625.4	12.241
+2802	14.022
+2989.5	14.801
+3188.7	13.517
+3400.1	11.465
+3624.6	9.6019
+3863	8.4115
+4116.1	7.6503
+4384.9	6.805
+4670.4	5.9246
+4973.5	5.3258
+5295.3	4.6448
+5637.1	3.8459
+6000	3.2699
--- a/aim-mat/tools/@signal/rampamplitude.m	Fri May 20 12:32:31 2011 +0100
+++ b/aim-mat/tools/@signal/rampamplitude.m	Fri May 20 12:36:17 2011 +0100
@@ -19,10 +19,13 @@
 if nargin < 2
     rt=0.01;
 end
+if rt==0
+    return
+end
 
 if strcmp(type,'linear')
     first_bin=1;
-    nr_point=time2bin(sig,rt);
+    nr_point=time2bin(sig,rtsig);
     last_bin=nr_point;
     ramp=linspace(0,1,(last_bin-first_bin));
     sig=sig*ramp;