Difference between () and ([])

1 Ansicht (letzte 30 Tage)
Prabha Kumaresan
Prabha Kumaresan am 26 Dez. 2017
Kommentiert: Prabha Kumaresan am 26 Dez. 2017
What is the difference C=rand(4,10) and C=rand([4,10])

Antworten (1)

KSSV
KSSV am 26 Dez. 2017
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 Kommentare
Walter Roberson
Walter Roberson am 26 Dez. 2017
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 am 26 Dez. 2017
ok

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by