app.UITable.Data assignment problem

조회 수: 10(최근 30일)
Sharmin Sultana Sheuly
Sharmin Sultana Sheuly 2020년 5월 5일
댓글: Sharmin Sultana Sheuly 2020년 5월 6일
I am having problem in assigning to app.UITable.Data.
My code is below
here, raw(row_nummber,2) is date time.
it shows the error message"Conversion to double from cell is not possible."
If I convert the date time to double than it does not appears in the table in the normal year- month-day format.
I cant change the whole table to date time as there are other numeric values. The table that I am developing in app designer has the following columns
Pallet number | date time | adjustmnet| shim dimension
Please help me.
Kind regards
  댓글 수: 3
Sharmin Sultana Sheuly
Sharmin Sultana Sheuly 2020년 5월 6일
Thanks for your help. I have solved the problem.

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

채택된 답변

Guillaume 2020년 5월 6일
편집: Guillaume 2020년 5월 6일
raw(row_nummber,2) is a cell array (made of just one cell),
raw{row_number, 2} is the content of that cell. As long as that content is a scalar double, then:
app.UITable.Data(row_nummber,2)=raw{row_nummber,2}; %note the use of {} to get the content of the cell
should work (assuming Data is a double matrix).
edit: see Access data in a cell array to understand the difference between {} and () when indexing cell arrays.

추가 답변(0개)


Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by