warning dialog

조회 수: 6 (최근 30일)
pink
pink 2011년 6월 18일
I want to use the data below for the logic
Data =
'' ''
'' ''
'' ''
'' ''
if %Data
warndlg('warningstring')
else
end

채택된 답변

Image Analyst
Image Analyst 2011년 6월 18일
Look up isempty(). And you probably want to wrap your warndlg inside a uiwait(). If it's like msgbox(), it will continue with your code, blasting right past that warning message unless you put it inside a uiwait().
  댓글 수: 9
Walter Roberson
Walter Roberson 2011년 6월 19일
I will need to do some testing to see when it is possible for the data to not be a cell array when it is retrieved. Unfortunately that is not something I can test from home with my current configuration.
I do not think you should be testing for the emptiness of the cells in the cell-clicked callback: if the user is editing a series of the cells, they are not going to want the calculations to take place until they are finished editing.
If you have the data and it _is_ a cell array and you want to ensure that there is something in each of the cells, then
any(cellfun(@isempty,data(:)))
will be true if there are any empty cells.
pink
pink 2011년 6월 19일
thanks walter..

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by