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

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:cc4b1211e677
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;