Standards for a function name
63 次查看(过去 30 天)
显示 更早的评论
MATLAB has a standard that a variable can only consist of digits, letters and underscores
Is there any standard for function names?
3 个评论
Adam
2016-8-25
I would assume that the same constraints on variable naming also apply to function naming.
采纳的回答
John D'Errico
2016-8-25
Why not read the help for functions? Surely the place to look. under
doc function
I immediately saw this line near the very top:
"Valid function names begin with an alphabetic character, and can contain letters, numbers, or underscores."
In addition, it is a terribly poor idea to use names for functions that are already in use. So calling your new function ones or zeros, or sum, is a really bad idea.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!