Click a variable in vector in matlab

How to push a variable in a vector in matlab?

Something like that:

A = [5 2 3]; push(A, 7); % A = [5 2 3 7] 

Thanks.

+7
source share
1 answer

I have found the answer.

Use this:

 A = [A, 7]; 

Or that:

 A(end + 1) = 7; 
+25
source

All Articles