summation of equation in matlab
1 次查看(过去 30 天)
显示 更早的评论
I have an equation
S(i)*(P-C(i))
I want to perform summation operation such that
where n can be n=2 ,3 ,4....
please tell me what will be the approached???
采纳的回答
Walter Roberson
2020-1-27
sum(S(1:n) .* (P - C(1:n)))
In the case where n is the same as the size of S and C then this can be simplified to
sum(S .* (P - C))
1 个评论
Wisal Adnan
2020-8-18
I want to perform summation operation such that
where n can be n=2 ,3 ,4.... where i start from 1 to 2n
please tell me what will solution?
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!