I presently have this code which tests a paricular function which I created _ _ [y n] function_gen1pdf1(a,b,c) _ _ for N times. Now this works fine up to N=100. However, I want it to work for N=100,000 but it's taking much too long to compute. Is it possible to vectorize it or make it work faster? Any suggestions are much appreciated!
N=100000;y=zeros(N,1);n=zeros(N,1);for i=1:N; %testing the function for 100000 times
[y(i) n(i)]= function_gen1pdf1(2,3,0.5); %The function being tested
end
Best Answer