How to push a variable in a vector in Matlab?

 Réponse acceptée

Matt J
Matt J le 7 Fév 2013
Modifié(e) : Matt J le 7 Fév 2013
A(end+1)=4;
or
A=[A,4];

3 commentaires

Manuel Ignacio
Manuel Ignacio le 7 Fév 2013
Thanks, Matt! :)
about string array? help me
Matt J
Matt J le 24 Avr 2019
This works for any array.

Connectez-vous pour commenter.

Plus de réponses (1)

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by