The difference between semicolon and comma

43 次查看(过去 30 天)
Hi matlab community ,
I am working on let' s say a homework. I realized that during the homework, The representations one of them x=[1,2,3] and x=[1;2;3] are different. What is the different between them? I get a solution using both of them but different.

采纳的回答

Wayne King
Wayne King 2013-3-31
x = [1,2,3];
creates a 1x3 row vector.
x = [1;2;3];
creates a 3x1 column vector
  1 个评论
engineerOfPhysics
engineerOfPhysics 2013-3-31
Well Why I get different result when I plot of sin(x) function ? between these values. ?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by