Queston for School, linearize an equation

2 views (last 30 days)
Leo Piringer
Leo Piringer on 7 Sep 2021
Answered: Image Analyst on 7 Sep 2021
Hi! I'm currently having a problem on one of my questions for my course in MatLab, the question follows
"Linearize the given equation. Use a suitable method to determine I0 and n.
The relationship between the current, I, and the voltage, U, in a specific electrical appliance can be described with this function: I=I0 ∙𝑒^(qU/nkT) where q = 1.60*10^-19, k = 1.38*10^-23, T = the temperature in Kelvin, I0 = the initial current and n is a constant, i've also been given the following table
where the appliance is active in a temperature of 300K."
I am currently stuck on this question so some help would be apprieciated, thanks! :)

Answers (1)

Image Analyst
Image Analyst on 7 Sep 2021
I don't know what you mean by linearize. Personally I'd use fitnlm() to fit a nonlinear model to it. I'm attaching my demo for fitnlm as used for an exponential growth, which is what you have.
Maybe they mean to take the natural log of the equation and then use polyfit() to fit a line through it.
I=I0 ∙𝑒^(qU/nkT)
log(I) =log(I0) + (qU/nkT)
coefficients = polyfit(U, log(I), 1);
From there you can figure out what any of the "constants" (that are not really constants) are.
Personally I would think that fitnlm() which fit the actual formula would give a better fit (lower residue).

Categories

Find more on Mathematics in Help Center and File Exchange

Tags

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!