mirror of
https://github.com/supleed2/ELEC50003-P1-CW.git
synced 2024-11-10 01:35:50 +00:00
22 lines
347 B
Plaintext
22 lines
347 B
Plaintext
data = csvread ( "charge.csv");
|
|
soc1 = data(:,6);
|
|
voltage2 = data(:,2);
|
|
|
|
data = csvread ( "discharge.csv");
|
|
current = data(:,2);
|
|
voltage = data(:,1);
|
|
|
|
x = 0:47771;
|
|
|
|
power = current.*voltage;
|
|
|
|
|
|
|
|
figure;
|
|
hold on;
|
|
plot(x, voltage, 'x');
|
|
xlabel('SOC (%)');
|
|
ylabel(' (mV)');
|
|
title('Charge cycle of a LiFePO4 battery');
|
|
set(gca,'FontSize',25);
|
|
hold off; |