I am working on a watermarking project that embeds binary values (i.e 1s and 0s)in the image for which i have to take the input from the user? And check certain conditions such as 1)no empty string 2)no other character or special character 3)no other number other than 0 and 1 is entered. following code just checks the first condition, is there any default function in matlab to check whether entered string is binary
int_state = get(handles.edit1,'String'); %edit1 is the Tag of edit box
` if isempty(int_state)`
fprintf('Error: Enter Text first\n');
else
%computation code
Aucun commentaire:
Enregistrer un commentaire