Difference between () and ([])

1 回表示 (過去 30 日間)
Prabha Kumaresan
Prabha Kumaresan 2017 年 12 月 26 日
コメント済み: Prabha Kumaresan 2017 年 12 月 26 日
What is the difference C=rand(4,10) and C=rand([4,10])

回答 (1 件)

KSSV
KSSV 2017 年 12 月 26 日
I don't think it makes any difference...both the cases you will get a random matrix of size 4X10...in fact [4,10] this needs a bit of more typing.
  3 件のコメント
Walter Roberson
Walter Roberson 2017 年 12 月 26 日
There is a very small difference in the time it takes to parse the arguments. There is no difference in the functionality.
Prabha Kumaresan
Prabha Kumaresan 2017 年 12 月 26 日
ok

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by