how i implement this equation.
Ältere Kommentare anzeigen
hey guys,
i am try to implement to loop of follow equation
where Eci is the energy charge by the ith sensor.

Akzeptierte Antwort
Weitere Antworten (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);
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!