AnsweredAssumed Answered

How to fit a line to a subsection of data in a transform?

Question asked by paulshepherd on Apr 8, 2014
Latest reply on Apr 24, 2014 by tqs_modeler
I am having a heck of a time applying a linear fit to a small region of data (the goal is to extract vt, ala the method shown in Baker 3rd Ed. p 293).

I have a plot of gm vs Vgs, and I have tried making transforms similar to the ones shown in the fit_line demo, but it just does seem to understand limiting the fit to a specific range of values. Here is my code in my transform to try to get a linear fit to the gm data from vgs values of 2.3 to 4.3 V:

gm = DERIVATIVE2(vg.m, id.m, 1, -1)
OVERRIDE_LIMITS = "Y"
X_LOW=2.3
X_HIGH=4.3
fit = fit_line(vg.m     , gm, 1, -1)
RETURN fit

I have tried defining X_LOW and X_HIGH in the Setup Variables tab as well, also with no luck. I have also tried the linfit function.

Any suggestions?

Thanks,
Paul

*edited to fix typos*

Edited by: Paul Shepherd on Apr 9, 2014 7:42 AM  

Outcomes