syms x
Caudal=[5.93266E-05, 0.00082573, 0.001571951, 0.002318172, 0.003064541, 0.004018053, 0.00493061, 0.005552929, 0.006549172, 0.007338123, 0.008085823, 0.008833522, 0.009415033, 0.009996545, 0.010868442, 0.011574151, 0.012196174, 0.013025341, 0.013895908, 0.014848681, 0.015801455, 0.017251758, 0.018371164, 0.019200479, 0.019781399, 0.02036254, 0.020860957, 0.021234807, 0.021691677];
v_c=sym(0.0000174)/sym(1.19);
A_disipador=sym(0.095)*sym(0.002)*sym(45);
for M=1:numel(Caudal)
V_Disipador=(Caudal(M)/A_disipador);
Re=(V_Disipador*sym(0.039))/(v_c);
eqn = (1/sqrt(x)==-2*log((sym(0.502)/sym(0.095))/sym(3.7)+sym(2.51)/(Re*sqrt(x))))
f{M} = vpasolve(eqn); %HERE IS THE ERROR
h{M} = f{M}*(sym(0.095)/sym(0.0039))*(sym(1.3048).^2/(2*sym(9.81)));
end
f
Look at the equation. The constant beign added inside the log() is more than 1, so provided the ratio divided by sqrt(x) is not negative, then the value inside the log() must be greater than 1, so the log must be positive. Positive log multiplied by negative 2 is going to be negative, and if x is positive then sqrt(x) is never negative so 1/sqrt(x) is never negative. We thus conclude that if x is positive then the equation cannot hold.
What if x is negative? Then sqrt(x) would be complex valued and you would be taking log of a complex value and trying to match it to -1i / sqrt(-x) . Can those be equal? I suspect not, but I have not investigated to prove it.