How to calculate 8760 data just in one process?

1 次查看(过去 30 天)
Hello dear friends. Hope you all fine. I use Matlab for my thesis and i need help. I have Excel file that have 8760 different number in a column. I have to put each of this number ın a same formula but its difficult to put each number and have to repeat the process 8760 time.
Help me how to enter this excle file and how to code just one process instead of 8760 time process in matlab.
Thanks in advance.

采纳的回答

Stephan
Stephan 2019-2-26
Hi,
this is easy:
1) Use xlsread to import the data to Matlab:
E = xlsread('PV.xlsx');
2) Define your constant values - for example:
I_ref_sc = 10;
E_ref = 1000;
mu_I_sc = 0.5;
T = 22.6;
T_ref = 20;
3) Write an anonymus function which is vectorized:
I_sc = @(E) I_ref_sc.*E./E_ref + mu_I_sc*(T-T_ref);
4. Calculate the result:
result = I_sc(E);
Thats all - the result is as big as E - in this case 8760x1
Best regards
Stephan
  1 个评论
Mohammad Sulaiman Stanekzai
Dear Sir thanks alot. It wroked perfectly. I have another problem. I uplaod the main formula here.
I have to find " I " here but the function is ''I = f(I)''. In the function also Isc and Voc are belong to ''E'' parametre and i solve this two (Isc and Voc) as you mintioned before. Please help me to find '' I ''.
By the way other parametres in the main formula are known.
current.JPGMy Best Regards
Sulaiman

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by