Create a top hat function
显示 更早的评论
Hello, Im trying to create a top hat function (that is 0 everywhere except between -halfpix & halfpix). the fucll width of the top hat (2* halfpix) is symetrical about the yaxis.
i've created it based in discrete values as below but I would like it as a general function.
x = -20:0.1:20;
t = zeros(1,length(x))
t(x>=-halfpix & x<halfpix) = 1;
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Assembly 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!