% 提取电池中放电等压降的时间
% load('B0005.mat');
% j = 0 ; % 记录等压降放电时间总次数
% B0005_DisCharge_Voltage_Time = []; % 设置存储等压降时间的容器
% for i=1:length(B0005.cycle)
% cycle_type = B0005.cycle(i).type; % 读取cycle结构体中type字段的值
% data_type = 'discharge';
% value = strcmp(cycle_type,data_type); % 判断两个字符串是否相同
%
% if value
% j = j + 1 ;
% B0005_Voltage_measured = B0005.cycle(i).data.Voltage_measured; % 将读取到的电压存储到新的数组中
% B0005_Voltage_Data_Time = B0005.cycle(i).data.Time; % 将读取到的时间存储到新的数组中
% [m,n] = size(B0005_Voltage_measured);
% for i=1:n
% if B0005_Voltage_measured(:,i) < 3.8
% B0005_Time_high = B0005_Voltage_Data_Time(:,i-1);
% break;
% end
% end
%
% for i=1:n
% if B0005_Voltage_measured(:,i) < 3.5
% B0005_Time_low = B0005_Voltage_Data_Time(:,i-1);
% break;
% end
% end
% B0005_DisCharge_Voltage_Time(j,:)=B0005_Time_low - B0005_Time_high;
% end
% end
% plot(B0005_DisCharge_Voltage_Time);
% legend('B0005实际放电等压降放时间');
% load('B0006.mat');
% j = 0 ; % 记录等压降放电时间总次数
% B0006_DisCharge_Voltage_Time = []; % 设置存储等压降时间的容器
% for i=1:length(B0006.cycle)
%
% cycle_type = B0006.cycle(i).type; % 读取cycle结构体中type字段的值
% data_type = 'discharge';
% value = strcmp(cycle_type,data_type); % 判断两个字符串是否相同
%
% if value
%
% j=j+1;
% B0006_Voltage_measured = B0006.cycle(i).data.Voltage_measured; % 将读取到的电压存储到新的数组中
% B0006_Voltage_Data_Time = B0006.cycle(i).data.Time; % 将读取到的时间存储到新的数组中
% [m,n] = size(B0006_Voltage_measured);
%
% for i=1:n
% if B0006_Voltage_measured(:,i) < 3.8 % 如果小于3.8V,记录时间
% B0006_Time_high = B0006_Voltage_Data_Time(:,i-1);
% break;
% end
% end
%
% for i=1:n
% if B0006_Voltage_measured(:,i) < 3.5 % 如果小于3.5V,记录时间
% B0006_Time_low = B0006_Voltage_Data_Time(:,i-1);
% break;
% end
% end
%
% B0006_DisCharge_Voltage_Time(j,:)=B0006_Time_low - B0006_Time_high; % 将每一组数据中等压降时间存入数组中
%
% end
%
% end
% plot(B0006_DisCharge_Voltage_Time);
% legend('B0006实际放电等压降放时间');
% load('B0007.mat');
% j = 0 ;
% B0007_DisCharge_Voltage_Time = []; % 设置存储等压降时间的容器
% for i=1:length(B0007.cycle)
% cycle_type = B0007.cycle(i).type; % 读取cycle结构体中type字段的值
% data_type = 'discharge';
% value = strcmp(cycle_type,data_type); % 判断两个字符串是否相同
%
% if value
% j = j + 1 ;
% B0007_Voltage_measured = B0007.cycle(i).data.Voltage_measured; % 将读取到的电压存储到新的数组中
% B0007_Voltage_Data_Time = B0007.cycle(i).data.Time; % 将读取到的时间存储到新的数组中
% [m,n] = size(B0007_Voltage_measured);
% for i=1:n
% if B0007_Voltage_measured(:,i) < 3.8
% B0007_Time_high = B0007_Voltage_Data_Time(:,i-1);
% break;
% end
% end
%
% for i=1:n
% if B0007_Voltage_measured(:,i) < 3.5
% B0007_Time_low = B0007_Voltage_Data_Time(:,i-1);
% break;
% end
% end
% B0007_DisCharge_Voltage_Time(j,:)=B0007_Time_low - B0007_Time_high;
% end
% end
% plot(B0007_DisCharge_Voltage_Time);
% legend('B0007实际放电等压降放时间');
% load('B0018.mat');
% j = 0 ;
% B0018_DisCharge_Voltage_Time = []; % 设置存储等压降时间的容器
% for i=1:length(B0018.cycle)
% cycle_type = B0018.cycle(i).type; % 读取cycle结构体中type字段的值
% data_type = 'discharge';
% value = strcmp(cycle_type,data_type); % 判断两个字符串是否相同
%
% if value
% j = j + 1 ;
% B0018_Voltage_measured = B0018.cycle(i).data.Voltage_measured; % 将读取到的电压存储到新的数组中
% B0018_Voltage_Data_Time = B0018.cycle(i).data.Time; % 将读取到的时间存储到新的数组中
% [m,n] = size(B0018_Voltage_measured);
% for i=1:n
% if B0018_Voltage_measured(:,i) < 3.8
% B0018_Time_high = B0018_Voltage_Data_Time(:,i-1); % 将每次循环中放电至高电压对应的放电时间赋值给新变量
% break;
% end
% end
%
% for i=1:n
% if B0018_Voltage_measured(:,i) < 3.5
% B0018_Time_low = B0018_Voltage_Data_Time(:,i-1); % 将每次循环中放电至低电压对应的放电时间赋值给新变量
% break;
% end
% end
% B0018_DisCharge_Voltage_Time(j,:)=B0018_Time_low - B0018_Time_high;
% end
% end
% plot(B0018_DisCharge_Voltage_Time);
% legend('B0018实际放电等压降放时间');
评论0