%
% Single Layer Morphological Perceptrons (SLMP) Example
% Uniformly Distributed Patterns
%
% Requires LearnSLMP.m, SLMP.m, and verclasse.m
%

clear
% Generating random patterns
X=10*rand(2,50);
% Generating the class of the patterns 
c=round(rand(1,50));

% SMLP Learning
[p,W]=LearnSLMP(X,c);
% Or [p,W]=LearnSLMP(X,c) for an alternative learning algoritm.
% Executing the SLMP network for classification
y=SLMP(p,W,X);
% Showing the the region of activation
verclasse(p,W,X,c);
