MATLAB: Warning: Explicit solution could not be found.

becouldequationsexplicitfoundnotsolutionwarning

>> syms x
>> total = 0;
>> t2 = 0;
>> t=0;
* >> p = 4.8825*exp(-0.0954*t)+ 12.845*exp(-0.0006211*t);*
>> help = 0;
>> for i = 1:2
*t2 = double(solve('4.8825*exp(-0.0954*t)+ 12.845*exp(-0.0006211*t)-p','t'));*
p = 4.8825*exp(-0.0954*(t2+4.77))+ 12.845*exp(-0.0006211*(t2+4.77));
total = total + double(int(4.8825*(exp(-0.0954*x)+12.845/4.8825*exp(-0.0006211*x)),x,t2,t2+4.77));
t=t+9.4446;
end
Warning: Explicit solution could not be found.
> In solve at 81
Hei, I got this problem with the above loop. I think the problem occurs when I try to assign a value to p; and then chuck it in solve('…').
I need to solve both these equation simultaniously though, and I have no idea of how to get there otherwise. Anybody care to shed some light on this? All help is greatly appreciated 🙂

Best Answer

Instead of
t2 = double(solve('4.8825*exp(-0.0954*t)+ 12.845*exp(-0.0006211*t)-p','t'));
use
t2 = double(solve(4.8825*exp(-0.0954*t)+ 12.845*exp(-0.0006211*t)-p,'t'));
Otherwise it will not pick up the value of p from the MATLAB variable you assigned earlier.