Help recursive function matlab code
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Thorsten
2015-4-28
编辑:Thorsten
2015-5-5
You need to know the value of udisk for one k, like k=0 to define an end of the recursion. Assuming that udisk(0) = 1, the definition is straightforward
function u = udisk(k, tau, M)
if k == 1 % replace these two lines with the
u = 1 % actual definition of udisk
else
u = udisk(k-1, tau, M) - tau*M*sign(phi(k));
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Testing Frameworks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!