필터 지우기
필터 지우기

How to push a variable in a vector in Matlab?

조회 수: 129 (최근 30일)
Manuel Ignacio
Manuel Ignacio 2013년 2월 7일
답변: Jozef Lukac 2020년 12월 29일
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일
A(end+1)=4;
or
A=[A,4];
  댓글 수: 3
Khac Dat Nguyen
Khac Dat Nguyen 2019년 4월 24일
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일
I have created an immitation of STL vector in Matlab. Check it out. :)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by