]> git.parisson.com Git - cnaq.git/commitdiff
fix fmax & fmin
authormanu <manu@5fc3e0e6-29bc-4d03-b52b-c088cb822bde>
Tue, 4 Dec 2007 15:48:28 +0000 (15:48 +0000)
committermanu <manu@5fc3e0e6-29bc-4d03-b52b-c088cb822bde>
Tue, 4 Dec 2007 15:48:28 +0000 (15:48 +0000)
git-svn-id: http://svn.parisson.org/svn/CNAQ/trunk@126 5fc3e0e6-29bc-4d03-b52b-c088cb822bde

tests/getdelay.m
tests/plotdelay.m

index c950e6410625fce068c613fdbad5465b4b014476..a9f0cb2dd0b0566ef277376a9d0405876a1769bd 100644 (file)
@@ -10,7 +10,7 @@ f_min=100;
 f_max=20000;
 lt=5;  
 t=0:1/44100:lt;
-sig=0.9*chirp(t,20,lt,20000,'logarithmic');
+sig=0.9*chirp(t,f_min,lt,f_max,'logarithmic');
 len_sig = length(sig);
 
 %playrecord signal
index 2b5a913b211adf8c777b6213cca3f00b237fd60c..56248a9b043afbd4f57420d5037bd5d876239626 100644 (file)
@@ -1,4 +1,4 @@
-function [mfv,ecart]=getdelay(n)
+function [mfv,ecart]=plotdelay(n)
 %this function allows measuring the lattency of the playrecord process for
 %n generation/acquisition operations
 if nargin < 1, n = 10; end
@@ -6,9 +6,9 @@ if nargin < 1, n = 10; end
 %signal generation
 f_min=100;
 f_max=20000;
-lt=5;  
+lt=2;  
 t=0:1/44100:lt;
-sig=0.9*chirp(t,20,lt,20000,'logarithmic');
+sig=0.9*chirp(t,f_min,lt,f_max,'logarithmic');
 len_sig = length(sig);
 
 %playrecord signal
@@ -21,10 +21,10 @@ for it = 1:n
        
 end
 
-mfv=mode(delai);
-ecart=std(delai);
-mfvt =num2str(mfv);
-sprintf('%s','the most frequent delay is ', mfvt,' samples.')
+% % mfv=mode(delai);
+% % ecart=std(delai);
+mfvt =num2str(mfv);
+sprintf('%s','the most frequent delay is ', mfvt,' samples.')
 
 %Plot results
 hist(delai)