href="http://www.codecogs.com/eqnedit.php?latex=\sum_{u=1}^{su-2} \cdot \sum_{v=1}^{sv}\cdot \delta \left ( Fh(u,v)=i,Fh(u@plus;1,v)=j)" target="_blank" rel="nofollow noopener noreferrer"<img src="http://latex.codecogs.com/gif.latex?\sum_{u=1}^{su-2} \cdot \sum_{v=1}^{sv}\cdot \delta \left ( Fh(u,v)=i,Fh(u+1,v)=j)" title="\sum_{u=1}^{su-2} \cdot \sum_{v=1}^{sv}\cdot \delta \left ( Fh(u,v)=i,Fh(u+1,v)=j)" /></a>
∑_(u=1)^(su-2)▒∑_(v=1)^sv▒δ(i,j)..how to write this equation in for loop?
1 次查看(过去 30 天)
显示 更早的评论
∑_(u=1)^(su-2)▒∑_(v=1)^sv▒δ(i,j)...here the summation lower limit is u=1 and upper limit is su-2 similar to next summation form....i didnt know is my matlab R2009b contains symbolic tool or not. can u tel this equation in "for" loop.
10 个评论
Walter Roberson
2012-10-15
What does F h ( u , v ) = i mean in the context of the delta function?
Does δ ( F h ( u , v ) = i , F h ( u + 1 , v ) = j ) mean the same as
1 if (Fh(u,v) == i & Fh(u+1,v) == j)
0 otherwise
?
采纳的回答
Björn
2012-10-15
编辑:Björn
2012-10-15
It seems that the delta is the Kronecker Delta. In that case ou can make the following for-loop for this:
result=0;
for u=1:su-2
for v=1:sv
if Fh(u,v) == Fh(u+1,v)
result=result+1;
end
end
end
result
Make sure that the matrix Fh is defined beforehand
The value of 'result' after the loops is the answer of the double sum.
2 个评论
Walter Roberson
2012-10-17
HTML tags are not recognized here.
We still need your answer to my question http://www.mathworks.co.uk/matlabcentral/answers/50365-_-u-1-su-2-_-v-1-sv-i-j-how-to-write-this-equation-in-for-loop#comment_105246
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!