Something like this:
A = [1 2 3];
push(A, 4); % Something like Push
% A = [1 2 3 4]
Thanks.

 채택된 답변

Matt J
Matt J 2013년 2월 7일
편집: Matt J 2013년 2월 7일

6 개 추천

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

댓글 수: 3

Thanks, Matt! :)
about string array? help me
Matt J
Matt J 2019년 4월 24일
This works for any array.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jozef Lukac
Jozef Lukac 2020년 12월 29일

0 개 추천

I have created an immitation of STL vector in Matlab. Check it out. :)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

2013년 2월 7일

답변:

2020년 12월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by