global pH

ph = linspace(6,8,10);

for k = 1:length(ph)
   pH = ph(k);
   x = newton('vinjord',[1 1 1 1 1 1 1]'*1e-2,1e-10);
   Ca(k) = x(1);
end

plot(ph,-log10(Ca))
grid
xlabel('pH')
ylabel('-log_1_0[Ca^2^+]')
title('Kalciumhaltens pH-beroende i jorden')
