creation of a dynamic matrix

조회 수: 6 (최근 30일)
omar Benamiar Messari
omar Benamiar Messari 2018년 7월 16일
댓글: omar Benamiar Messari 2018년 7월 16일
Hello, I'm working on a gui and I need to have a dynamique Matrix that will allow me to store the user values, I will have a button and 4 text box the user should write 4 values on the textbox and each time he will push a button, I should store my 4 value on the next raw of my matrice so i'll have 4 column and M raw, so my M row will be dynamic.
if you have some exemples that would be perfect . thank's in advance

채택된 답변

Guillaume
Guillaume 2018년 7월 16일
편집: Guillaume 2018년 7월 16일
A = [1 2 3;
4 5 6]
newrow = [7 8 9];
%add a row to existing matrix:
A = [A; newrow]
%or
%A(end+1, :) = newrow
  댓글 수: 3
Guillaume
Guillaume 2018년 7월 16일
A = [];
newrow = [7 8 9];
%add a row:
A = [A; newrow]
omar Benamiar Messari
omar Benamiar Messari 2018년 7월 16일
ow thank you so much

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by