Stochastic Simulation

np = find(max(abs(p)) == abs(p)); % Find maximum peak. fest(k) = f(np); % Assign its corresponding frequency to the estimate. end % Estimate the standard deviation of the output for each pass in loop % to examine the likelihood of convergence and a reasonable variance. ncount = ncount+1; % Increment index to store standard deviation results ................
................