Create a long rectangular signal with a function handle
显示 更早的评论
I was wondering if there is a quick way to create a rectangular signal during 20 sec for example, with a function handle. I tried the following command which requires you to do it for every step.
Thanks.
u=@(t) double((0<=t & t<0.5) + ...
(1<=t & t<1.5) + ...
(2<=t & t<2.5)) .* 1;

采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




