data = readmatrix("test");
t = data(:,1);
I_batt = data(:,2);
V_batt = data(:,3);

diff(t) = dt;

I_mid = (I_batt(1:end-1)+I_batt(2:end))/2;
Cap = sum(I_mid .*dt)/3600;
fprintf("capacity = %d Ah", Cap);
