I want to use an integral over a vector but I will see an error for sys_eff which is " First input argument is not function handle."
I will be glad to have your guide and thanks in advance.
I should mention that all vectors have the same ize as 345600.
function [ P_loss,time_eff, sys_eff ] = final( Pmpp, Pl_inv, Pl_bat_inv, Pl_bat_r )
j=length(Pmpp);
for t=1:j;
P_loss(t)= Pl_inv(t) + Pl_bat_inv(t) + Pl_bat_r(t);
time_eff(t)= P_loss(t)/Pmpp(t);
end
sys_eff=integral(time_eff,0,345600);
end