How to write loop for "I" in the mentioned equation?

1 次查看(过去 30 天)
Hello everyone. Please help me.
In following equation i have to find "I" and equation is like I=f(I) . In this equation each Isc and Voc parameter has 8784 values in excel fıle. For each value of Isc (Isc = First value from excel file) and Voc (Voc = First value from excel file), V is equal to [0 : 0.5 : 20] . Therefore "I" has 40 answers.
For Isc (Isc = Second value from excel file) and Voc (Voc = Second value from excel file), V is again equal to [0 : 0.5 : 20] . Therefore again "I" has 40 answers.
For Isc (Isc = Third value from excel file) and Voc (Voc = Third value from excel file), V is again equal to [0 : 0.5 : 20] . Therefore again "I" has 40 answers.
The system has to repeat this process 8784 time.
I used the following loop but it doesn't work and gives error. I need your help.
F= xlsread('Isc.xlsx'); % Isc (contain 8784 different values)
B= xlsread('Voc.xlsx'); % Voc (contain 8784 different values)
c= I
i=1
while i<22
for V = 0:0.5:20
syms c
Q = c == (F.*(1-(exp(q*(V - B + (c*Rs))/L))));
c = vpasolve (Q,c);
I (i) = c;
i = i+1;
end
end
I
Thanks in advance.
  2 个评论
shoaib Ch
shoaib Ch 2019-3-3
istly call all values of variables that are fixed
V = 0:0.5:20
for i=1:8784
V (i)= 0:0.5:20
Q = (F.*(1-(exp(q*(V(i) - B + (c*Rs))/L))));
end
Mohammad Sulaiman Stanekzai
编辑:Mohammad Sulaiman Stanekzai 2019-3-3
Thank you sir,
By the way the values for Isc and Voc is not like [0,1,2,3,... 8784].
This two parameters has different values. The tolat values for each of this parameter is 8784.
F= xlsread('Isc.xlsx');
B= xlsread('Voc.xlsx');
F= Isc
B= Voc
c= I
i=1
while i<22
for V = 0:0.5:20
syms c
Q = c == (F.*(1-(exp(q*(V - B + (c*Rs))/L))));
c = vpasolve (Q,c);
I (i) = c;
i = i+1;
end
end
I

请先登录,再进行评论。

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by