Asked by Nuno
on 6 Apr 2011

I have the next expression and my unknown is "I".

I = ICC - IR.*(2.718.^((V1+Rs*I)./(m.*VT))-1) - ((V1+Rs.*I)/Rp);

Exist any function im Matlab that resolve this expression without math methods?

*No products are associated with this question.*

Answer by Matt Tearle
on 7 Apr 2011

Accepted answer

OK, to expand on the cyclist's answer:

- rewrite your equation in the form f(I) = 0: ICC - IR.*(exp((V1+Rs*I)./(m.*VT))-1) - ((V1+Rs.*I)/Rp) - I = 0
- having defined all the constants (ICC, m, VT, etc), make a function of I using an anonymous function handle:
`f = @(I) ICC - IR.*(exp((V1+Rs*I)./(m.*VT))-1) - ((V1+Rs.*I)/Rp) - I;` - apply
`fsolve`to`f`

Like Walter, I'm assuming 2.718.^foo really means e^foo, which, in MATLAB, should be implemented as exp(foo).

Show 10 older comments

Walter Roberson
on 11 Apr 2011

No, you can only solve for a single value of V1 if you are using fzero() . You could solve over multiple V1 if you had the optimization toolkit and fsolve() but the setup would change.

If you go back to the symbolic LambertW expression that I showed, then you should be able to vectorize that.

Walter Roberson
on 11 Apr 2011

Answer by Matt Fig
on 6 Apr 2011

What do you mean "without math methods?" MATLAB uses *only* math methods as far as I know...

Show 11 older comments

Matt Tearle
on 7 Apr 2011

Yeah, we wouldn't want any awkwardly named functions...

**cough CUMTRAPZ cough***

Image Analyst
on 15 Oct 2015

Answer by the cyclist
on 6 Apr 2011

You could use the function "fzero" to solve this equation.

Answer by Tim Zaman
on 6 Apr 2011

I guess what you need is just a solver; for example you define

syms ICC IR V1 Rs m VT Rp;

solve('I = ICC - IR.*(2.718.^((V1+Rs*I)./(m.*VT))-1) - ((V1+Rs.*I)/Rp)')

-untested-

Show 1 older comment

Walter Roberson
on 6 Apr 2011

Symbolically, assuming 2.718 represents exp(1),

-(V1-(-LambertW(-Rs*IR*Rp*exp(Rp*(Rs*ICC+Rs*IR+V1)/(m*VT*(Rp+Rs)))/(-Rs*m*VT-Rp*m*VT))+Rp*(Rs*ICC+Rs*IR+V1)/(m*VT*(Rp+Rs)))*m*VT)/Rs

Ugly. But it is the standard form to solve such equations, which is a fact you would have to know through mathematical experience as the Lambert W function is not one of the obvious ones.

Walter Roberson
on 7 Apr 2011

Related Content

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply Today
## 0 Comments