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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by