MATLAB: Variable string in warning dialog b warndlg string=0;string=num2str(string); Is it possible to write "number:0" (as 0 is variable) within warning dialog box? Best Answer value = 2; warning(['number ' num2str(value)]) Related SolutionsMATLAB: Variable into msgbox?? The 2nd input of MSGBOX is a string containing the dialog's title. See "help msgbox".msgbox(cat(2, {'These values are incorrect:'}, k), 'Warning')The CAT command joins the single cell string with the list of strings in the cell string k to create the message. MATLAB: Warning dialog 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(). Related QuestionFinding occurences of a string in a text string and storing locations of the occurencesIs fullfile(0,0) undocumented behavior or bugUiwait and warning dialog problemArray of strings into 2 number arrayDialog box’s ParentReading string within a string
Best Answer