clear;
clc;

sim('id_vds',1);
ids = Id{1}.Values.Data(79:131);
vds = Vds{1}.Values.Data(79:131);

p = polyfit(vds(43:53), ids(43:53), 1);

line = polyval(p, vds);
lamda = 1/(p(2)/p(1));

figure(1)
plot(vds, ids);
hold on
plot(vds, polyval(p, vds));
hold off
grid
xlabel('Vds')
ylabel('Ids')


    