Code covered by the BSD License  

Highlights from
Fuzzy Relational Calculus Toolbox, Rel.1.01

image thumbnail
from Fuzzy Relational Calculus Toolbox, Rel.1.01 by Yordan Kyosev & Ketty Peeva
The toolbox provides functions and original algorithms for solving direct and inverse problems.

[A,B]=zerodiag(n);
function  [A,B]=zerodiag(n);
% function  [A,B]=zerodiag(n);
% generates input matrices A, size "n x n" and B 
% where A with zeros in the main diagonal
% A=[      0    1.0000    1.0000
%    0.6667         0    0.6667
%    0.3333    0.3333         0]
% B= [1.0000
%     0.6667
%     0.3333]
% input for solve_fls

for i=1:n
    B(i)=1-((i-1)/(n));
    for j=1:n
        if i==j
            A(i,j)=0;
        else
            A(i,j)=B(i);
        end
    end
end
B=B';

Contact us at files@mathworks.com