variable in local function in livescript
Mostrar comentarios más antiguos
In livescript,
I define
a=1;
Then define a local function
function y = multi(x)
y = a*x;
end
This will give an error message. How can I define a as a global variable?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Scope Variables and Generate Names en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!