Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Empty sym: 0-by-1

303 views
Skip to first unread message

shahid iqbal

unread,
Jun 5, 2016, 12:44:09 PM6/5/16
to
Hi dear all
I am trying to solve the following equation for "x" but i am facing "Warning: Cannot find explicit solution. " error an getting Empty sym:0-by-1. can any one genrous help me in this regard? I will be very thankful

eqn=D1/log(1+k1.*x)==B1./(x-C1);
eqn = rewrite(eqn,'log');
solx = solve(eqn, x, 'IgnoreAnalyticConstraints',1)

Nasser M. Abbasi

unread,
Jun 5, 2016, 3:56:29 PM6/5/16
to
>> clear
>> eqn=D1/log(1+k1.*x)==B1./(x-C1);
Undefined function or variable 'D1'.

You should post complete self contained code. Not fragments.
i.e. starting from

clear
syms .....
....
... to the end

Then copy paste all of the above. Do not copy half the code.

Also, in syms, no need for the "." in there. Do not confuse syms with
no syms.

--Nasser

Roger Stafford

unread,
Jun 6, 2016, 6:30:10 PM6/6/16
to
"shahid iqbal" wrote in message <nj1ksj$hm7$1...@newscl01ah.mathworks.com>...
My very ancient version of Matlab's ‘solve’ came up with this solution:

x = -(D1+lambertw(-D1/k1/B1*exp(-D1*(1+C1*k1)/k1/B1))*k1*B1)/D1/k1

You should be able to find the ‘lambertw’ function somewhere in your symbolic toolbox or in mupad. Note that there are two real branches for ‘lambertw’ over a certain range.

Roger Stafford
0 new messages