how to define an sum function

8 ビュー (過去 30 日間)
ISIMG
ISIMG 2012 年 5 月 19 日
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 件のコメント
Andrei Bobrov
Andrei Bobrov 2012 年 5 月 19 日
missing or unnecessary brackets in the first row of code
John D'Errico
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 ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by