How to write a summation code when the k is not equal to j
Show older comments
I want to write the code like this,and the rage of k is 1 to K,but i don't know how to write the " j is not equal to k" this summation code,can anyone show me how to write it ?

1 Comment
Debnath Goswami
on 28 Sep 2020
Accepted Answer
More Answers (1)
Torsten
on 17 Jan 2019
0 votes
If all arrays involved have K elements, you can use
h = ...;
lambda = ...;
f = ...;
S = sum(h);
H = S-h ;
result = sum(lambda.*f.*H)
Categories
Find more on Structures 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!