Change Width of line

2 次查看(过去 30 天)
Rajat Powade
Rajat Powade 2022-6-16
I want to change width of line that is passing from 80%capacity retention . I am attaching image and code below
clc
%crate=0:1:10;
G=-I_BT;
h=3700;%no. of cycles
T=30+273;%temp in kelvin
R=8.314;%universal gas const
capa=5.2;%battery capacity
%batt_curr batt_HESS=[1,2,3,4]
A=[G];
[n, xout] = hist(A,60);
c_rate=abs((xout.*(n>0))/capa);
B = exp(1.226*exp(-0.2797*c_rate)+9.263);
A_h=abs(xout.*(n>0)).*(n/3600);
Dk=zeros(h,2);
for i=1:h
q_k=B.*exp((-31700+370.3.*c_rate)/(R.*T)).*((i.*A_h).^0.55);
Qk=100-sum(q_k);
Dk(i,:)=Qk;
end
figure(3)
a=yline(80)
plot(Dk,'LineWidth', 4)
%set(gca,'fontsize', 18);
%set(gca,'LineWidth', 4);
ylim([0 100]);
a=yline(80)
xlabel('No. of Cycles');
ylabel('Capacity Retention %');
%legend('Battery Capacity Retention');

回答(2 个)

Image Analyst
Image Analyst 2022-6-16
yline(80, 'LineWidth', 3);
  1 个评论
Rajat Powade
Rajat Powade 2022-6-16
Can u please help me to find intersection of this two curves . Means please provide the code

请先登录,再进行评论。


Star Strider
Star Strider 2022-6-16
The ‘I_BT’ value is missing.
cycnr80 = interp1(Dk,(1:numel(Dk)),80)
This should produce the cycle number where ‘Dk’ crosses 80 (assuming that the cycle number begins at 1).
.

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by