calculate an equation with index

4 views (last 30 days)
Dija
Dija on 2 Dec 2014
Edited: Dija on 3 Dec 2014
how can i calculate this equation kon=k1n1+k2n2+....kr-1nr-1

Answers (1)

Thorsten
Thorsten on 2 Dec 2014
x = 0:N-1;
kon = sum(x.^2);

Community Treasure Hunt

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

Start Hunting!