Checking values in a Column in UItable and to put an indicator for missing value

조회 수: 3(최근 30일)
thin su
thin su 2021년 12월 14일
댓글: thin su 2021년 12월 17일
I have imported the data into the UItable and i would like to have an indicator which is the lamb to switch to 'red' if there is any missing data like in the table. Is there any way i could do it? Thank you

채택된 답변

Reshma Nerella
Reshma Nerella 2021년 12월 17일
You can do it in the following way:
  1. Add a buttonPushedCallback for the button 'Check for missing data'
  2. In the callback, check if there are any missing values in table using ismissing function
  3. Check if the logical array output of the ismissing function contain any 1's i.e missing values
  4. If 1's exist, change the color of lamp to 'red', else leave it in as is in green.
  댓글 수: 2
thin su
thin su 2021년 12월 17일
oh! @Reshma Nerella i have got it, i used a break after the if statement and it is working well. Thank you!

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

추가 답변(0개)




Community Treasure Hunt

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

Start Hunting!

Translated by