フィルターのクリア

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

2 ビュー (過去 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 日
Hi,
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 日
hi! thank you for the answer.
I have tried iterating the logical array (code shown below).However, my lamp continue turning out green which means that there are no missing datas when in fact, the data sample that i am using has 2 missing datas.
I am guessing that it continue to loop hence the error. Should there be a break after it found the first missing data
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 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by