How do I assign the value of a matrix to a cell of an object "uitable" ?

조회 수: 1 (최근 30일)
Pedro Guevara
Pedro Guevara 2019년 5월 5일
편집: Adam Danz 2019년 5월 6일
Good afternoon. I request your help again. I have a data of a matrix (right part of the equality) that I want to send specifically to a position (V_org (cells, 1), 6) of a table called "TableDataElements". I already tried this code, but I can not get the data to appear in the table. Could someone help me? Thank you.
TablaDatosElementos ( V_org ( celdas, 1 ) , 6 ) = datos ( V_org (Pos_igual1x (j,1) , 1 ) , 6 ) ;

답변 (1개)

Adam Danz
Adam Danz 2019년 5월 5일
편집: Adam Danz 2019년 5월 5일
Assuming "TablaDatosElementos " is the handle to your uitable, you must assign the value to the 'Data' field.
TablaDatosElementos.Data(V_org(celdas,1),6) = datos(V_org(Pos_igual1x(j,1),1), 6);
This assumes "V_org(celdas,1)" indicates the row number and the right side of the equality produces a scalar value.
  댓글 수: 13
Pedro Guevara
Pedro Guevara 2019년 5월 6일
I'm sure it's named like that. The tag is "TablaDatosElementos"
Adam Danz
Adam Danz 2019년 5월 6일
편집: Adam Danz 2019년 5월 6일
In the example you shared you're assigning the value zero to one element of the uitable that already contains a value of 0. Since that's the only example I've seen, it appears that your code is working perfectly.
Perhaps the values being produced that go into the table are incorrect.
If you can provide a segment of code and input values that reproduce what you're seeing, I'd be glad to look at it. So far, everything I've seen looks normal.

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

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by