variable in local function in livescript
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Scope Variables and Generate Names in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!