comparison toolboxes/FullBNT-1.0.7/bnt/examples/static/Zoubin/rdiv.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 % function Z=rdiv(X,Y)
2 %
3 % row division: Z = X / Y row-wise
4 % Y must have one column
5
6 function Z=rdiv(X,Y)
7
8 [N M]=size(X);
9 [K L]=size(Y);
10 if(N ~= K | L ~=1)
11 disp('Error in RDIV');
12 return;
13 end
14
15 Z=zeros(N,M);
16
17 if M<N,
18 for m=1:M
19 Z(:,m)=X(:,m)./Y;
20 end
21 else
22 for n=1:N
23 Z(n,:)=X(n,:)/Y(n);
24 end;
25 end;