Home Understand min, max, meshgrid functions to plot MED boundary in pattern recognition
Reply: 0

Understand min, max, meshgrid functions to plot MED boundary in pattern recognition

user939
1#
user939 Published in June 19, 2018, 6:11 pm

This code is correct But, I don't understand what is the relationship of using min, max and meshgrid functions with plotting of MED contour of two classes. I hope my question is clear...... thanks

%% Computing the classifiers
step = 0.2; % The lower this is the smoother the contours.
x = min([samples_a(:,1);samples_b(:,1)])-1:step:max([samples_a(:,1);samples_b(:,1)])+1;
y = min([samples_a(:,2);samples_b(:,2)])-1:step:max([samples_a(:,2);samples_b(:,2)])+1;
[X1, Y1] = meshgrid(x,y);

x = min([samples_c(:,1);samples_d(:,1);samples_e(:,1)])-1:step:max([samples_c(:,1);samples_d(:,1);samples_e(:,1)])+1;
y = min([samples_c(:,2);samples_d(:,2);samples_e(:,2)])-1:step:max([samples_c(:,2);samples_d(:,2);samples_e(:,2)])+1;
[X2, Y2] = meshgrid(x,y);

% Plotting the MED boundaries
contour(X1,Y1,MED1, [0, 0], 'Color', 'magenta', 'LineWidth', LINE_WIDTH);
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.35906 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO