I don't use matlab much and my coding skills aren't too good. Any help would be appreciated. I am trying to solve the equation:
0.001 * 18 * ( -x/2 + x^(1/3) ) = -log(1-x) + x + 0.4*x^2
eqn = 0.001 * 18 * ( -x/2 + x^(1/3) ) == -log(1-x) + x + 0.4*x^2 ;
S = solve(eqn,x)
But it gave me the trivial solution of x=0, which isn't what I am looking for, so I tried a plotting based code:
y = -log(1-x) + x + 0.4*x^2;
q = 0.001 * 18 * ( -x/2 + x^(1/3) );
But that is also giving me issues. I think it may have something to do with using the dot operator (.) to define y and q as an array of values corresponing to the array of values of x, rather than a single value, because I remember that giving me trouble in the past, but I tried a few versions and I am still using it incorrectly. Please help.