Find function return value in Matlab -


this question has answer here:

the find() function in matlab returns , empty 1x0 matrix if not able find given criteria. how check if indeed case - given criteria satisfied in matrix provided?

check isempty

b = [ 1 2 3 5 ];  = find( b == 4 ); if isempty( )    fprintf(1,'not found\n'); end 

Comments