How to write loop for "I" in the mentioned equation?
1 view (last 30 days)
Show older comments
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206613/image.jpeg)
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 Comments
shoaib Ch
on 3 Mar 2019
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
Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!