Should I indicate no input arguments to a function?
Show older comments
Suppose I have a function which requires no inputs. Should I indicate it with parentheses () or leave it naked? Both cases work, but is there a convention in the MATLAB community?
Example:
someFunction
% do sth
end
vs
someFunction()
% do sth
end
1 Comment
Accepted Answer
More Answers (0)
Categories
Find more on Function Creation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!