Matlab function help in simulink model
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 19 de Ag. de 2013
Editada: Azzi Abdelmalek
el 19 de Ag. de 2013
function y = func_name(a)
persistent b
if isempty(b)
b=0;
end
b=b+a;
y=b;
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Naming Conventions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!