how to add element in vector?

조회 수: 2 (최근 30일)
Rohit Bhoi
Rohit Bhoi 2016년 2월 28일
댓글: Jan 2016년 2월 28일
I have a gui in which there is one edit text box and two buttons namely add and save. I have created on blank vector as v=[]; whenever user press add the value of edit text should be added to the vector? how to do that?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 2월 28일
v=[]
a=10
v=[v a]
  댓글 수: 3
Azzi Abdelmalek
Azzi Abdelmalek 2016년 2월 28일
use guidata function
Jan
Jan 2016년 2월 28일
@Azzi: I think the code is meaningless, because the v does not have any effects here. The OP inserted this exactly as posted into his code, such that v=10 is performed in every case.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by