Matlab function help in simulink model
1 次查看(过去 30 天)
显示 更早的评论
i want to write this function in Matlab Function Box
{
function y = func_name(a)
b=b+a;
y=b;
}
the error is b is not defined
Actually I want write code for integration and derivative block
0 个评论
采纳的回答
Azzi Abdelmalek
2013-8-19
编辑:Azzi Abdelmalek
2013-8-19
function y = func_name(a)
persistent b
if isempty(b)
b=0;
end
b=b+a;
y=b;
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!