I have a function of the following and it only gives the last value. I want to see a vector of Nf and pf. I tried inserting i. For example Nf(i)=Nf and received the following error:
Attempted to access Nf(2); index out of bounds because numel(Nf)=1.
Error in probabilitycounter (line 23) Nf(i)=Nf
Here is what I have written to produce actual data:
function [Nf,pf]= probabilitycounter(N,mu_x,mu_y,sig_x,sig_y)