필터 지우기
필터 지우기

Array indices must be positive integers or logical values.

조회 수: 2 (최근 30일)
Timothy Schackne
Timothy Schackne 2020년 3월 25일
댓글: Timothy Schackne 2020년 3월 25일
I am trying to plot an I-V curve but I keep getting the same error
Isc = 8.7 % short circuit current
ns = 30
np = 40
n = 1.95 %Ideality factor
K0 = 0.0017
Tr = 300 % refrence temperature
Is = 1.2*10^-7 % diode reverse saturated current
q = 1.602*10^-19 % electron charge
K = 1.38*10^-23 %Boltzmann constant
Rs = 0.013
Rp = 3.5
% Part1 %
S_1 = 1000 % apparent power
T_1 = 233.15
Vpv = (0:0.01:1.2)
Ipv1 = zeros(length(T_1),length(Vpv))
Power1 = zeros(length(T_1),length(Vpv))
for k = 1:length(T_1)
Ipv1(k,:) = (np.*((Isc+K0.*(T_1(k)-Tr))./100).*S_1)-((np.*Is).*(exp(q.*Vpv)./(n.*K.*T(K).*ns))-1)-((np.*Vpv)./(ns.*Rp));
Vpv1 = Vpv.*ns;
f_1 = figure(1);
P1 = plot(Vpv1,Ipv1(k,:),'LineWidth',2.0);
grid on
hold on
title('Current vs Voltage Based on Changing Temperature');
ylabel('Current (A)');
xlable('Voltage (V)');
ylim([0,6000]);
ax = gca;
ax.FontSize = 10;
ax.FontName = 'Times New Roman';
legend('T = -40c','T = -20c','T =0c','T = 20c','T = 40c','T = 60c','Location','southwest');
end

답변 (1개)

Sindar
Sindar 2020년 3월 25일
(n.*K.*T(K).*ns))
is that supposed to be T*K or T(k)?

카테고리

Help CenterFile Exchange에서 Semiconductors and Converters에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by