how to define an sum function
8 次查看(过去 30 天)
显示 更早的评论
hi , i want to define this function in matlab :
f=sum(sum(c(i,k)*(x(i,k)))+sum(sum((h(i,j))*(1-sum(y(i,j)))
i=1:10;
j=1:10;
k=1:3;
i!=j;
thank you for helping me
2 个评论
John D'Errico
2012-5-19
It looks like you want to write a for loop, but have not read any help on how to use for loops. Perhaps it is time to start with this:
doc for
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!