Hi all. I am trying to make a while loops that will keep on running if the user input is a str, a number less and equal 0 or the number is longer the length of my vector. But it doesn't work, plz help:)
deleterowStr=input('Please enter the number of the row:','s');deleterow=str2num(deleterowStr);while ~((~isempty( deleterow) && deleterow <=0 || deleterow > length(W)) || strcmpi(deleterowStr,'')==1) disp('Invaild row number') deleterowstr=input('Please enter the number of the row:','s'); deleterow=str2num(deleterowstr);end
thx:)
Best Answer