Procházet zdrojové kódy

return sampling rate, remove unnecessary printf's

Fernando Pablo Lopez-Lezcano před 10 roky
rodič
revize
08ae276a42
1 změnil soubory, kde provedl 2 přidání a 5 odebrání
  1. 2 5
      sphear_af_power.m

+ 2 - 5
sphear_af_power.m

@@ -4,7 +4,7 @@
 %% sphear_af_power: return array of power for all capsules in a range of frequencies
 %%
 %% usage:
-%%   [R] = sphear_af_power(fmin, fmax, N, Npre)
+%%   [R Fs] = sphear_af_power(fmin, fmax, N, Npre)
 %%
 %% fmin, fmax: range of frequencies to consider
 %% Npre: number of samples before the main impulse
@@ -30,7 +30,7 @@
 %%  You should have received a copy of the GNU General Public License
 %%  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-function [R] = sphear_af_power(measurements, fmin, fmax, N, Npre)
+function [R Fs] = sphear_af_power(measurements, fmin, fmax, N, Npre)
   pkg load signal;
 
   %% read in reference microphone, select samples to process
@@ -47,11 +47,9 @@ function [R] = sphear_af_power(measurements, fmin, fmax, N, Npre)
 
   capnames = cellstr(['LF'; 'RF'; 'LB'; 'RB']);
 
-  printf("... processing [%d] ", size(measurements));
   %% all submitted measurements
   i = 1;
   for m = measurements
-    printf("%d ", m);
     %% all capsules
     for c = 1:4
 
@@ -67,7 +65,6 @@ function [R] = sphear_af_power(measurements, fmin, fmax, N, Npre)
     end
     i = i + 1;
   end
-  printf(", done (%d)\n", size(R(:,:))(1));
   
 end