gpt4 book ai didi

具有递减循环计数器的 Matlab for 循环

转载 作者:太空宇宙 更新时间:2023-11-03 19:39:32 25 4
gpt4 key购买 nike

这个 for 不工作,我知道为什么,你能帮我吗?

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

关于具有递减循环计数器的 Matlab for 循环,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14033454/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com