Re: Solving eqn in matlab
- From: "rasika " <n.rasika@xxxxxxxxx>
- Date: Wed, 9 Nov 2011 00:45:27 +0000 (UTC)
Thanks Steven will remove cell,
do let me know how to get it solved, it doesnt seem to give any numeric answer.
even if I specify the constants in workspace, it does ignore their values.
I tried Taylor series too assuming that solve might now be working because i have constant*var + log(var) format on LHS., but it doesnt take in the log(cell) term,
I looked up in my help for solve, all examples have strings passed in them, I dont knw how to make matlab take my A,B,C as constants, and I and R as any vectors.
What I wanted to see was a vector of outputs for Cell.
"Steven_Lord" <slord@xxxxxxxxxxxxx> wrote in message <j9begq$jdc$1@xxxxxxxxxxxxxxxxxxxxxxxx>...
"Christopher Creutzig" <Christopher.Creutzig@xxxxxxxxxxxxx> wrote in message news:4EB9281A.9070102@xxxxxxxxxxxxxxxx
> On 08.11.11 05:45, rasika wrote:
>> C*(50-R)*Ccell - 2.5lnCcell= ln((Is/I)/((1-Is)/I)) - ln B - A*(50-R)
>> Here A, B and C are constants.. and I have to evaluate Ccell from >> various values of I, and for a column vector values of R.. but this is >> the simplest form it can get solved to..
>> How to get it solved in Matlab?
>> If I use the solve function it gives me this o/p
>> syms Cell;
>>>> solve('C*(50-R)*Cell - 2.5*log(Cell)=log((Is/I)/(1-(Is/I))) - >>>> log(B)-A*(50-R)')
> When you pass a string to solve, it will completely ignore all values
> you have assigned to your MATLAB variables, including Cell, Is, I, etc.
> Additionally, I means sqrt(-1) in this context.
In addition to what Christopher said, I would avoid using Cell as your variable name; it's too close to the CELL function and it would be easy to accidentally type "cell" instead of "Cell" -- if you did, you'd receive an error.
To contact Technical Support use the Contact Us link on http://www.mathworks.com
- Prev by Date: Re: submission search
- Next by Date: Matrix Converter
- Previous by thread: Re: Solving eqn in matlab
- Next by thread: Re: Solving eqn in matlab