Ok. Can I use fsolve to vectorize? My guess based on your answer is that I can not use fsolve either.
You could use fsolve to vectorize, but my feeling is that it is better not to, because this will increase the dimension of the problem and potentially slow convergence.
My recommendation would be to use parfor to parallelize the fzero calls. If the sol(i) are expected to change gradually with i, an alternative way to accelerate things would be to use sol(i-1) as your initial guess, as in,
init=[0,1000];
for i = 1:N
sol(i) = fzero( @(xx) f(xx, X(i)), init);
init=sol(i);
end