Hold the same values of else
4 次查看(过去 30 天)
显示 更早的评论
Vadc <Vdisp is no longer true for the first time and I want the values to hold the same values of else even if Vadc <Vdisp is true again.
function [G,S] = f(H,clock,T,Vadc,Vdisp,R)
if (clock>T+R+0.2)
if (Vadc<Vdisp)
G=H;
S=1;
else
G=pulse;
S=0;
end
else
G=H;
S=1;
end
3 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!