No BSD License
-
A* B exactly.
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
A* B exactly.
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
A* B exactly.
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
intersect_PR(A, B, zero, rec_...
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
max_coord_dist(A) % returns t...
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
max_differ_mat(A, B) % return...
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
product(A, B, zero, rec_depth...
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
product(A, B, zero, rec_depth...
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
sqm_rand_init(dim, re_left, r...
% Copyright (C) May/June 2005 by Henrik Pagenkopf
-
main.m
-
test1.m
-
View all files
|
|
| max_differ_mat(A, B) % returns the maximum Euklidian coordinate distance for matrices A and B.
|
%
% Copyright (C) May/June 2005 by Henrik Pagenkopf
%
function [row, col, dist]= max_differ_mat(A, B) % returns the maximum Euklidian coordinate distance for matrices A and B.
%
% - cond: A and B are square matrices and have same sizes >= 1.
%
sa = size(A);
sb = size(B);
if sa(1) >= 1 && sa(1)== sa(2) && sb(1)== sb(2) && sa(1)== sb(1) % => sa(2)== sb(2)
s = sa(1);
max = 0;
rp = 1; cp = 1; % current row and column position
for i = 1 : s
for k = 1 : s
m = A(i,k)- B(i,k);
d = real(m)^2 + imag(m)^2; % non-negative
if d > max
max = d;
rp = i;
cp = k;
end % if
end
end % for
dist = max;
row = rp ;
col = cp ;
else % error
end
% return.
|
|
Contact us at files@mathworks.com