matlab - MATLAB 中 [1 2] 和 [1 ,2] 有什么区别吗?

标签 matlab syntax

>> [1 2]

ans =

     1     2

>> [1 ,2]

ans =

     1     2

>> 

看起来是一样的,是真的吗?

最佳答案

不;没有什么区别。请参阅here欲了解更多信息:

The simplest way to create a matrix in MATLAB is to use the matrix constructor operator, []. Create a row in the matrix by entering elements (shown as E below) within the brackets. Separate each element with a comma or space:

row = [E1, E2, ..., Em]          row = [E1 E2 ... Em]

关于matlab - MATLAB 中 [1 2] 和 [1 ,2] 有什么区别吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2644759/

相关文章:

matlab - 如何在 MATLAB 中绘制 3D 箭头/矢量?

python - 标识符中的Unicode下标和上标,为什么Python认为XU == Xᵘ == Xᵤ?

ruby - 在哪里使用 ruby​​ splat 运算符是合法的?

MySQL更新错误

c++ - 如何在 C++ 和 MATLAB 之间交换数据?

matlab - 在事件轮廓法中绘制能量

MATLAB 黑洞变量

jquery 为多个元素语法设置 css

javascript - 简单的 javascript IF 语句 - 正确的语法是什么?

arrays - 如果数组末尾的额外元素在嵌套循环的下一次迭代中更短,如何计算数组末尾的额外元素