matlab - 我应该在 MATLAB 中的属性名称后加上分号吗?

标签 matlab oop formatting

<分区>

在面向对象的 MATLAB 中推荐的格式是什么:是否在属性名称后加上分号?

classdef SemicolonVersion
   properties
      prop1;
   end
end

classdef NoSemicolonVersion
   properties
      prop1
   end
end

最佳答案

您可以使用任何一个。 MATLAB 文档同时使用这两种方法,因此实际上没有公认的方法。随心所欲地使用。

http://mathworks.com/help/matlab/matlab_oop/specifying-attributes.html

关于matlab - 我应该在 MATLAB 中的属性名称后加上分号吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34062202/

相关文章:

html - 表单验证反馈颜色

android - 字符串数组文本格式

matlab - 为什么我得到 "Unable to read file ' topo60c'. Matlab 中没有这样的文件或目录”错误?

matlab - 如何将矩阵分配给变量?变量可以是矩阵变量吗?

oop - 编写健壮的 "modern"Fortran 代码

java - 简单工厂与工厂方法

scala - 如何在 Scala 中打印 map

excel - matlab,如何将文本和数值数据导出到 excel csv 文件?

matlab - 制作静态图例,独立于实际剧情

java - 这是 DAO 管理器模式吗?适当的类和接口(interface)名称是什么?