Concatenate array using square brackets

4 vues (au cours des 30 derniers jours)
Quang Nguyen
Quang Nguyen le 26 Oct 2022
Commenté : Voss le 26 Oct 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 ?

Réponse acceptée

Voss
Voss le 26 Oct 2022
  4 commentaires
Quang Nguyen
Quang Nguyen le 26 Oct 2022
Thank you very much, i really get it now
Voss
Voss le 26 Oct 2022
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by