Concatenate array using square brackets

4 visualizzazioni (ultimi 30 giorni)
Quang Nguyen
Quang Nguyen il 26 Ott 2022
Commentato: Voss il 26 Ott 2022
x = zeros(1,9);
x = [1, x(1:9)];
when i run the second line multiple times, it starts to fill in the array x. I want to ask what is the functionality of the second line, and is there any documentation that describes this syntax ?

Risposta accettata

Voss
Voss il 26 Ott 2022
  4 Commenti
Quang Nguyen
Quang Nguyen il 26 Ott 2022
Thank you very much, i really get it now
Voss
Voss il 26 Ott 2022
You're welcome!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by