How to push a variable in a vector in Matlab?

 Akzeptierte Antwort

Matt J
Matt J am 7 Feb. 2013
Bearbeitet: Matt J am 7 Feb. 2013

6 Stimmen

A(end+1)=4;
or
A=[A,4];

3 Kommentare

Thanks, Matt! :)
Khac Dat Nguyen
Khac Dat Nguyen am 24 Apr. 2019
about string array? help me
Matt J
Matt J am 24 Apr. 2019
This works for any array.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by