3*3 kernal slide
显示 更早的评论
I'm working on local tri directional quienry pattern (LTriDP) for 3*3 matrix it works fine but my kernal is not moving on next 3(overlapping window) matrix elements to calculate LTDP. need help how can my kernal move after calculating firts 3*3 here is the code below.
1 个评论
Walter Roberson
2019-1-19
Goodness! Convert that long chain of if /else if /else if statements into if /elseif/ elseif, and then use the Smart Indent feature of the editor. Your indentation makes the code hard to follow.
采纳的回答
更多回答(1 个)
Walter Roberson
2019-1-19
0 个投票
Why should it move? You loop i=1:3, j=1:3 and that is it.
You calculate [r ,c]=size(LTDP) but after that you never refer to r or c so at no point are you looping over the rows or columns of LTDP.
2 个评论
ayesha abbassi
2019-1-19
Walter Roberson
2019-1-19
Yes but you have no code to move the kernel. You would need one or more loops around the "for i" loop, moving the starting row and column.
类别
在 帮助中心 和 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!