1
0
Эх сурвалжийг харах

add license to Aaron Heller's A2B matlab/octave code, change display/sprintf to fprintf

Fernando Pablo Lopez-Lezcano 10 жил өмнө
parent
commit
d41c3c2614
2 өөрчлөгдсөн 37 нэмэгдсэн , 3 устгасан
  1. 17 0
      A2B_matrix.m
  2. 20 3
      pv2params.m

+ 17 - 0
A2B_matrix.m

@@ -1,3 +1,20 @@
+%%
+%% Copyright 2007, Aaron Heller, All Rights Reserved
+%% heller@ai.sri.com
+%%
+%%  This program is free software: you can redistribute it and/or modify
+%%  it under the terms of the GNU General Public License as published by
+%%  the Free Software Foundation, either version 3 of the License, or
+%%  (at your option) any later version.
+%%
+%%  This program is distributed in the hope that it will be useful,
+%%  but WITHOUT ANY WARRANTY; without even the implied warranty of
+%%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%%  GNU General Public License for more details.
+%%
+%%  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 [A2B pv max_err] = A2B_matrix(Y, X, v_z_factor)
   % fit 4x4 matrix to measured mic data
   %

+ 20 - 3
pv2params.m

@@ -1,5 +1,22 @@
+%%
+%% Copyright 2007, Aaron Heller, All Rights Reserved
+%% heller@ai.sri.com
+%%
+%%  This program is free software: you can redistribute it and/or modify
+%%  it under the terms of the GNU General Public License as published by
+%%  the Free Software Foundation, either version 3 of the License, or
+%%  (at your option) any later version.
+%%
+%%  This program is distributed in the hope that it will be useful,
+%%  but WITHOUT ANY WARRANTY; without even the implied warranty of
+%%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%%  GNU General Public License for more details.
+%%
+%%  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 pv2params (pv)
-  display(sprintf('mic\t sens\t dir\t fbr\t az\t el\n'));
+  fprintf('mic\t sens\t dir\t fbr\t az\t el\n');
   for i = 1:size(pv,1)
     p = pv(i,1);
     v = pv(i,2:4);
@@ -11,7 +28,7 @@ function pv2params (pv)
     o = v / norm(v);
     az_el_rad = [ atan2( o(2), o(1) ) asin( o(3) ) ];
     az_el_deg = 180/pi * az_el_rad;
-    display(sprintf('%5g\t %5g\t %5g\t %5g\t %5g\t %5g\n', ...
-		    i, s, d, fbr_dB, az_el_deg(1), az_el_deg(2)));
+    fprintf('%5g\t %5g\t %5g\t %5g\t %5g\t %5g\n', ...
+	    i, s, d, fbr_dB, az_el_deg(1), az_el_deg(2));
   end
 end