- set(obj, 'property', value)
- mymeth(obj, ...)
- obj.mymeth % no argument
- feval('myfun', arg1)
Recognizing properties, methods and function names in Matlab code.
3 次查看(过去 30 天)
显示 更早的评论
I'm writing a global naming convention change utility for Matlab code. To this end, I would like to know the answers to the following:
In correctly written Matlab and excluding dynamic access:
1. Given a property name outside of its declaration in class, will it always be preceded by a dot?
2. Given a method name outside of its declaration in class, will it always be preceded by a dot?
3. Given a method name outside of its declaration in class, will it always be followed by zero or more whitespaces and an open parenthesis OR followed by an @ symbol?
4. Given a standalone function name will it always, in correctly (non-deprecated) written code, be followed by zero or more whitespaces and an open parenthesis OR be preceded by an @ symbol?
Thank you for any help.
0 个评论
回答(1 个)
Bruno Luong
2022-4-16
None of that is true. Some counter examples:
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!