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.
![](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 个评论
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
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!