The lambda value is a function, f(x), and the k value is activity of a specific neuron.
But, the poissrnd function in matlab only takes lambda as a parameter, so I can only give it poissrnd(f(x)). How can I get it to use the k value I want so the distribution is P(lambda, k) = (lambda^k * exp(-lambda))/k! as the poisson distribution should be?
Does matlab use a default value for k?
You don't need to change K,because K represents the value of the occurence. For the function poissonrnd,you can decide the number of sample that you take from the poisson distribution.
In other words, K is always 1:1:N, once you decide lambda you can compute the probability of each descrete occurence K.
Grant, the Poisson distribution only has one parameter. Lorenzo's post may have solved your problem, or you may have to explain what you mean by "k". Perhaps you are talking about some generalization of the Poisson?
The expression you wrote is the probability function evaluated at k for a
given lambda. So k in that formula is analogous to the output from poissrnd.
You don't supply that value when you generate random numbers.
-- Tom