필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Mohammad Sulaiman Stanekzai
Mohammad Sulaiman Stanekzai 2019년 3월 3일
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일
편집: 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개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by