how i implement this equation.
Mostra commenti meno recenti
hey guys,
i am try to implement to loop of follow equation
where Eci is the energy charge by the ith sensor.

Risposta accettata
Più risposte (1)
This depends on the format of Ec... is it a matrix or cell array?
Assuming Ec is a matrix with "i" rows and "e" columns...
Ec = zeros(c,1);
for i = 1:c
Ec(i) = sum(Ec_ie(i,:));
end
or in a single line:
Ec = sum(Ec_ie,2);
Categorie
Scopri di più su Introduction to Installation and Licensing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!