Clear Filters
Clear Filters

How to calculate 8760 data just in one process?

1 view (last 30 days)
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.

Accepted Answer

Stephan
Stephan on 26 Feb 2019
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 Comment
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

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with MATLAB 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!