Please, help me understand working of this sigmoid function

  1. Ixy2 =ImVar(S,1); %variance of 3*3 neighbour
  2. for k = 1:D
  3. minDd = min(min(Ixy2(:,:,k)));
  4. meanDd = mean(mean(Ixy2(:,:,k)));
  5. alpha = meanDd;
  6. kk = log(0.01)/(minDd-alpha);
  7. u(:,:,k) = 1-1./(1+exp(kk*(Ixy2(:,:,k)-alpha))); %weight calculated with Sigmoid functionu,:,:,k
  8. end
I'm confused that whats happening after line four

2 commentaires

They're just creating temporary variables alpha and kk because otherwise the equation in line 7 would be super confusing and hard to follow.
Yes I understand that, i'm confused with purposes of functions.
Means, why log0.01 is being divided by min-mean and so on.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by