MATLAB: How to get Matlab to solve an equation involving log(x) and a constant*x on LHS and log of a vector on RHS

logno unique answersolve

syms cell
A=0.079;
B=6*10^-9;
C=3.5*10^-10;
R=37;
Is=260;
I=111;
solve('3.5*10^-10*(50-37)*cell-2.5*2*cell^3+19*2.5*cell^2+58*2.5*(cell-1)-2.5 - log((260/213)/(1-(260/213)))+log(6*10^-9)+0.079*(50-37)',cell)
# My function is
C*(50-R)*Cell - 2.5lnCell= ln((Is/I)/((1-Is)/I)) - ln B - A*(50-R)
# here A, B and C are constants.. and I have to evaluate Cell from various values of I (* Please Note that I and R will be column vectors*), but this is the simplest form it can get solved to..
# I tried taylor series and got the simplified polynomial upto 3rd degree written in the code above and tried the solve function in Matlab,
# but it doesnt give a precise answer.
It gives me something like this
0.010445769111979284562103573703606*i - 3.1376696917728734352799890792042
11.729473052830051198402521143474 - 0.0039054714002454279122938908075595*i
0.014351240512224712474397464511166*i + 0.90819663894282223687746793573033
Please help me with this problem. Thank you

Best Answer

A=0.079;
B=6*10^-9;
C=3.5*10^-10;
Is=260;
syms I Cl R
v = C*(50-R)*Cl - 2.5*log(Cl) - log(Is/I/(1-Is/I)) + log(B) + A*(50-R);
f2 = matlabFunction(solve(v,Cl))
% e.g.
out = f2([34 111],[37 23])