Classifying data as either 1 or 0

So i have this:
xd = -20:1:20;
yd = -20:1:20;
[x,y] = meshgrid(xd,yd);
A = 0.3;
B = 1;
C = -9;
z = 1./(1+exp(-1*(A*x + B*y + C)));
And I want to pull data that has a value of 1 and put it into one matrix, and then pull data with values of 0 and stick it into another matrix so that i can plot them but I dont know how to, any suggestions?

Respuestas (1)

Image Analyst
Image Analyst el 25 de Mzo. de 2021
map1 = z == 1;
map0 = z == 0;

2 comentarios

Kyle Fielder
Kyle Fielder el 25 de Mzo. de 2021
But then how do i plot the values when theyre either approaching 0 or 1.
also im on discord if youd be down to just talk me through it.
mapNear1 = abs(z - 1) < someTolerance;
mapNear0 = abs(z) < someTolerance;

Iniciar sesión para comentar.

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 25 de Mzo. de 2021

Comentada:

el 25 de Mzo. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by