Matlab用于减少循环计数器的循环 [英] Matlab for loop with decreasing loop counter
本文介绍了Matlab用于减少循环计数器的循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此功能不起作用,我可以弄清楚为什么,您能帮我吗?
this for is not working and I can figure out why, can you help me?
for l = (300:1:-1)
gauss = fspecial('gaussian',[1 round(1+0.15*l)], 0.015*l);
filter_g(l,:,1) = filter2(gauss, img_d(l,:,1));
filter_g(l,:,2) = filter2(gauss, img_d(l,:,2));
filter_g(l,:,3) = filter2(gauss, img_d(l,:,3));
end
推荐答案
向量(300:1:-1)
的值为空.
向量是start:step:end
.因此,您想要300:-1:1
Vectors are start:step:end
. Thus, you want 300:-1:1
这篇关于Matlab用于减少循环计数器的循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文